Reading Response content w/ 400s #2127
Unanswered
Redoubts
asked this question in
Potential Issue
Replies: 1 comment 1 reply
-
|
@Redoubts Hi, Does accessing If the response has been read in the process of executing the event hook (I think the client does that) then those attributes should be available for use. Method |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've seen some APIs that will return an error code of 400, but still put something in the response body. Usually confirming the error, or maybe a little detail about how the request was wrong.
Indeed:
But if I tack on
event_hooks={"response": [lambda x: x.raise_for_status()]}to my client, reading this info off the response is impossible.Am I doing this wrong, or should we expect
raise_for_statusto block reading?Beta Was this translation helpful? Give feedback.
All reactions