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.
Loading
Please register or sign in to comment