HomeSoftware Heritage

api/graph: Fix error responses for invalid request Accept header

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

Description

api/graph: Fix error responses for invalid request Accept header

When setting an unsupported value for the request Accept header when
querying the /api/1/graph/ endpoint, an error was raised as the Django
DRF response does not have the accepted_media_type attribute set in
that case, leading to a 500 HTTP status code.

So ensure a proper JSON error response will be generated with the
406 HTTP status code when submitting such requests.

Details

Provenance
anlambertAuthored on Oct 25 2021, 1:40 PM
anlambertPushed on Oct 25 2021, 3:44 PM
Differential Revision
D6546: api/graph: Fix error responses for invalid request Accept header
Build Status
Buildable 24682
Build 38517: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.