Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #13214
Closed
Open
Issue created Aug 17, 2022 by Administrator@rootContributor

Request info is not included in ApiException

Created by: redixin

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

Assignee
Assign to
Time tracking