All errors will now be reported as a http response with a non-200 status code, and a JSON body with this shape:
{
"code": "...",
"message": "..."
}
Two status codes are now reserved to indicate issues with http request signatures:
401 for the ValueError raised when the signature uses an unsupported hashing algorithm or when it didn't contain all the expected attributes (these should never occur when connected to the Dispatch platform)
403 for any other verification failures related to the signing keys
This PR changes the FastAPI adapter to return error responses in the format expected by the Connect protocol (see https://connectrpc.com/docs/protocol/#error-end-stream).
All errors will now be reported as a http response with a non-200 status code, and a JSON body with this shape:
Two status codes are now reserved to indicate issues with http request signatures:
ValueError
raised when the signature uses an unsupported hashing algorithm or when it didn't contain all the expected attributes (these should never occur when connected to the Dispatch platform)