HomeSoftware Heritage

server/app: Fix aiohttp >= 3.7 exception related errors

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

Description

server/app: Fix aiohttp >= 3.7 exception related errors

Since aiohttp 3.7, the internal handling of aiohttp.web.HTTPException has changed
and a aiohttp.web_response.Response is now constructed from the exception text
then returned.

aiohttp exception constructions in swh-graph were passing error message through
the body keyword parameter instead of the text one, leading to an error related
to unicode decoding as body is expected to be bytes.

Using the text keyword parameter when constructing aiohttp exceptions now ensures
that response body will be properly encoded.

Closes T2768

Details

Provenance
anlambertAuthored on Nov 12 2020, 3:09 PM
anlambertPushed on Nov 12 2020, 3:29 PM
Differential Revision
D4466: server/app: Fix aiohttp >= 3.7 exception related errors
Tasks
T2768: unbreak swh-graph CI
Build Status
Buildable 17061
Build 26334: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.