Skip to content
Snippets Groups Projects
Commit fcca8787 authored by vlorentz's avatar vlorentz
Browse files

Return HTTP 503 on AioRpcError

AioRpcError exceptions used to trigger the default error handler
of SWH's RPC framework, which msgpacks the exception.

Under some circumstances, this caused the msgpack to hit
recursion limits, and logged very large errors to Sentry.

Additionally, SimpleTraversalView now calls wait_for_connection()
before returning 200; which allows catching some gRPC errors early
and returning 503 instead.

This does not work all the time though; gRPC errors occuring in the
middle of the stream still raise `ChunkedEncodingError` on the client
side, but there is not much we can do about that.
parent 4a7f3f76
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment