Title: `UnexpectedStatus` contains an uninformative message · Issue #839 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: `UnexpectedStatus` contains an uninformative message · Issue #839 · openapi-generators/openapi-python-client
X Title: `UnexpectedStatus` contains an uninformative message · Issue #839 · openapi-generators/openapi-python-client
Description: Problem Now when we set raise_on_unexpected_status=True in the client, we will only see Unexpected status code: 400 (or smt like) when any unexpected status is received. But in fact, this is an uninformative message. To find out what is ...
Open Graph Description: Problem Now when we set raise_on_unexpected_status=True in the client, we will only see Unexpected status code: 400 (or smt like) when any unexpected status is received. But in fact, this is an uni...
X Description: Problem Now when we set raise_on_unexpected_status=True in the client, we will only see Unexpected status code: 400 (or smt like) when any unexpected status is received. But in fact, this is an uni...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/839
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`UnexpectedStatus` contains an uninformative message","articleBody":"### Problem\r\n\r\nNow when we set\r\n```python\r\nraise_on_unexpected_status=True\r\n```\r\nin the client, we will only see `Unexpected status code: 400` (or smt like) when any unexpected status is received. But in fact, this is an uninformative message. To find out what is the reason for this exception, we should try to reproduce the situation ourselves and check the content of the response. Sometimes it's very difficult.\r\n\r\n## Solution I'd propose\r\n\r\nMaybe add response content to text of [UnexpectedStatus](https://github.com/openapi-generators/openapi-python-client/blob/a719c87b7d278135c475d8123aa144651fa55523/openapi_python_client/templates/errors.py.jinja#L10) exception? Or add some flag that allows us to show the contents of the response when we receive an unexpected status code?","author":{"url":"https://github.com/M1troll","@type":"Person","name":"M1troll"},"datePublished":"2023-08-16T07:55:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/839/openapi-python-client/issues/839"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f98bde08-dd58-052a-dd5a-d40b4e4d9a78 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D11A:D0E91:6A9EE:876B2:69801DFE |
| html-safe-nonce | a5a22a3592791f0e13c2d9e9b8dea6a7574ec05ca65695295e86cfda13769b1d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTFBOkQwRTkxOjZBOUVFOjg3NkIyOjY5ODAxREZFIiwidmlzaXRvcl9pZCI6Ijc2MDY1OTYzMDY3NzMwMjc4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4f5933e3a60f2ca2b881524ffed3507dca4aae24b09a3627f83c52ef69f69f2c |
| hovercard-subject-tag | issue:1852708774 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openapi-generators/openapi-python-client/839/issue_layout |
| twitter:image | https://opengraph.githubassets.com/811749ad12fd091eb282135d3eb136d0ba1ae3a78da9e0f4c6b42cb48468fb4e/openapi-generators/openapi-python-client/issues/839 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/811749ad12fd091eb282135d3eb136d0ba1ae3a78da9e0f4c6b42cb48468fb4e/openapi-generators/openapi-python-client/issues/839 |
| og:image:alt | Problem Now when we set raise_on_unexpected_status=True in the client, we will only see Unexpected status code: 400 (or smt like) when any unexpected status is received. But in fact, this is an uni... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | M1troll |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/openapi-generators/openapi-python-client git https://github.com/openapi-generators/openapi-python-client.git |
| octolytics-dimension-user_id | 84925606 |
| octolytics-dimension-user_login | openapi-generators |
| octolytics-dimension-repository_id | 240776275 |
| octolytics-dimension-repository_nwo | openapi-generators/openapi-python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 240776275 |
| octolytics-dimension-repository_network_root_nwo | openapi-generators/openapi-python-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width