OpenAPITools / OpenAPITools/openapi-generator
[BUG][JAVA] ApiException does not expose detailMessage without the HTTP Response Info
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Calling ApiException.getMessage() includes the HTTP response code, response body and response headers as requested in issue 12205. I would like a way to fetch the detailMessage without this extra HTTP detail.
openapi-generator version
7.3.0
Generation Details
Java generation with OkHTTP GSON libraries
Steps to reproduce
Call getMessage() on a returned ApiException and it includes the detailMessage as well as HTTP Response information, there is no way to get just the detailMessage.
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/12205
Suggest a fix
Provide a way to access just the message/detailMessage without the additional HTTP Response Info.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generated Java ApiException class and the getMessage() path used by the OkHTTP GSON client; compare its detailMessage with the HTTP response code, body, and headers. Done means a caller can retrieve only detailMessage while the existing getMessage() behavior remains covered by the reproduction described for version 7.3.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100