-
-
Notifications
You must be signed in to change notification settings - Fork 599
Revert "Fixed the exceptions" #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "Fixed the exceptions" #422
Conversation
That said, maybe we shouldn't revert this, and should roll with both fixes, otherwise the journal can never see our exceptions. |
The Journal is for http related exceptions IMO. Domain exceptions should be handled in your code, unhandled exceptions should be logged by the framework. |
You want to log an HTTP Request and a Domain Exception together? |
But it would be nice to use the Symfony Profiler page for HTTPlug to see if I received a |
Indeed. Some of our exceptions here aren't exactly very domain targeted. |
I guess we should add this interface on GitHub exceptions that should be visible in on the profiler page. IE not RuntimeException, InvalidArgumentException or MissingArgumentException etc. |
From a public API point of view, you shouldn't even know the HTTP transport layer is under the hood. If you want to handle limit exceed as part of your domain, then it has nothing to do with the HTTP flow (in fact you will see a client error code, but that's it). If you want to handle it as part of the HTTP flow, implement the Httplug exception on that one, but I think exceptions in general are definitely not HTTP related ones, rather domain specific. |
Agreed.
Yes. We want to handle it as part of the HTTPflow to be able to show more detailed message. I've created a custom plugin for that. @GrahamCampbell: Make sure to update those exception related to this plugin with the HTTPlug exception interface. |
So waitin for httplug pr to be merged first? |
Yeh, that upstream library needs fixing for anything to happen. |
Still needed. The fix that went through was different. |
seems you have removed our fork so I can't merge it @GrahamCampbell |
We should not merge this one. We should decide what exceptions are HTTP exceptions and what exceptions that should abort the flow of plugins. Only HTTP exceptions should have the HTTPlug exception interface. We are currently blocked by some updates on php-http/client-common if I recall correctly. I'll investigate in this later this week. |
The correct way to handle this to get domain exceptions would be to catch it outside of the http library stuff. |
Exactly. Domain exceptions should be handled outside of the Plugin chain. |
Reverts #410. // cc @sagikazarmark
The other fix in the underlying http library is better. There are still issues here anyway.
Closes #420.