OpenAPITools / OpenAPITools/openapi-generator
Request info is not included in ApiException
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
When API error returned, it sometimes hard to figure out what exactly was requested, because only http response details are included:
kubernetes.client.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Audit-Id': '9954faf3-7258-4619-b6b4-c3ac0b55a340', 'Cache-Control': 'no-cache, private', 'Content-Type': 'text/plain; charset=utf-8', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'cee19ddf-4747-45cb-93a7-e774fe2a061e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '1d97a02a-9039-4fde-bf2e-1e9779e51408', 'Date': 'Thu, 04 Aug 2022 10:14:55 GMT', 'Content-Length': '19'})
HTTP response body: b'404 page not found\n'
Knowing http request details may be helpful. Something like this:
kubernetes.client.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Audit-Id': '9954faf3-7258-4619-b6b4-c3ac0b55a340', 'Cache-Control': 'no-cache, private', 'Content-Type': 'text/plain; charset=utf-8', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'cee19ddf-4747-45cb-93a7-e774fe2a061e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '1d97a02a-9039-4fde-bf2e-1e9779e51408', 'Date': 'Thu, 04 Aug 2022 10:14:55 GMT', 'Content-Length': '19'})
HTTP response body: b'404 page not found\n'
HTTP request headers: <REQUEST HEADERS HERE>
HTTP request URI: <REQUEST URI HERE>
Based on this one: https://github.com/kubernetes-client/python/issues/1872
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 Python client's kubernetes.client.exceptions.ApiException and compare the requested error details with the example in this issue and the linked Kubernetes client issue. The work is done when API exception output includes the relevant HTTP request headers and URI alongside the existing response details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, python
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100