HomeSoftware Heritage

Return HTTP 503 on AioRpcError

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

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.

Details

Provenance
vlorentzAuthored on Sep 6 2022, 5:10 PM
vlorentzPushed on Sep 6 2022, 5:54 PM
Differential Revision
D8404: Return HTTP 503 on AioRpcError
Tasks
T4497: [sentry] Out of disk space
Build Status
Buildable 31363
Build 49061: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.