Cannot call raise_for_status
as the request instance has not been set on this response.
#3252
Answered
by
DeoLeung
DeoLeung
asked this question in
Potential Issue
-
if upstream failed with 599, calling |
Beta Was this translation helpful? Give feedback.
Answered by
DeoLeung
Jul 26, 2024
Replies: 2 comments 1 reply
-
Could you include a runnable example to demonstrate? |
Beta Was this translation helpful? Give feedback.
1 reply
-
the problem was, I did some other error handling logic in a subclass client, which return a new def handle_error(res: httpx.Response):
return httpx.Response(...) now doing below works def handle_error(res: httpx.Response):
return httpx.Response(..., request=res.request) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tomchristie
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the problem was, I did some other error handling logic in a subclass client, which return a new
httpx.Response
now doing below works