symfony: [HttpClient] Can we not trigger_error and throw exception or log warning instead?
Description StreamWrapper triggers error (lvl warning).
This causes an issue because it always falls into an error handler that is currently set (set_error_handler()).
So even though I catch the error using catch(ErrorException){ }, the error handler is triggered anyways.
Example
Sentry php sdk sets its own error handler. trigger_error() triggers it without me having any control over it. So I have to unset the error handler before making a request and then set it back again.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (19 by maintainers)
almost yes (I would not call error_reporting() because here we always want to report the error, and I would pass any deprecations to the previous error handler, if any.)
Or they can skip that and add
@in front of the call they do (but then I’d hope they’d useerror_get_last()to provide useful error messages.Hmm, interesting. With httpbin, I’m encountering the same behaviour as you. Might be related to request body or/and the device at the end which you can imagine as a kind of Tamagotchi. Will investigate flow path/get something reproducible and get back. Thanks for your time!
Where is
$messagecoming from?