\Http\Browser: Is there a way to get the content on request errors? #526
Unanswered
Donatello-za
asked this question in
Q&A
Replies: 1 comment
-
|
Have a look at https://reactphp.org/http/#withrejecterrorresponse it describes how not to throw on non-successful codes. As well as how to get te response from the exception. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
When a request is made to the server such as using the
post()method on a\Http\Browserinstance and the server returns with an error 400 response, is there a way to still get the body of the response? Typically the Browser instance will throw an exception with a generic error such as "HTTP status code 400 (Bad Request)" but I can't figure out how to still get the body of the response in order to log or debug it.Beta Was this translation helpful? Give feedback.
All reactions