SyliusResourceBundle icon indicating copy to clipboard operation
SyliusResourceBundle copied to clipboard

Error handling, revisited

Open kachayev opened this issue 5 years ago • 1 comments

There are quite a few changes introduced here. Would be more than happy to get comments before merging into 1.0.0 branch 😀

Notably:

  • both servers and clients close connection (context, to be more precise) in case of exceptions
  • error-logger parameter is added for HTTP client/server, Websocket client/server to customize exceptions logging for those exceptions that could not be visible to user's code in any other way (e.g. something that happens within HTTP server pipeline)
  • TimeoutException handlers are fixed in HTTP client (to avoid double disposal of the connections)
  • HTTP decoder errors are now properly handled to deal with bad traffic, error code statuses are fixed
  • HTTP client propagates throwable to the caller whenever possible (rather than just relying on connection being closed later)
  • :aleph/interrupted? flag is introduce as a part of ring request object for HTTP server, making it's possible to track if streaming body was closed because of an error (e.g. decoder exception, premature close, etc)
  • a lot of unit tests to check failure scenarios

kachayev avatar Oct 06 '20 08:10 kachayev

@gsnewmark Thanks a lot for the review! Let me address obviously wrong things and get back with more comments 😀

kachayev avatar Oct 07 '20 06:10 kachayev

Quick update

I spent a bit of time already trying to rebase this branch on master. It's not that easy but the number of tests that have been added are really valuable.

arnaudgeiser avatar Oct 08 '22 09:10 arnaudgeiser

Superseded by #658

Not all the changes from this PR have been included as some were significant in terms of impact. However, the unit tests have been included and some fixes have been made.

arnaudgeiser avatar Feb 07 '23 07:02 arnaudgeiser