Page MenuHomeSoftware Heritage

api/graph: Forward error response from the graph API
ClosedPublic

Authored by anlambert on Jan 11 2022, 4:42 PM.

Details

Summary

If the request sent to the graph API returns an error, forward
the raw error response as the Web API response instead of trying
to parse a JSON response that usually fails.

Diff Detail

Repository
rDWAPPS Web applications
Branch
api-graph-error-handling
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25939
Build 40538: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 40537: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D6918 (id=25064)

Rebasing onto e0a181daf4...

Current branch diff-target is up to date.
Changes applied before test
commit 15e6e1988a5667631bfc1c9585b0d710e27ad6be
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Jan 11 16:38:15 2022 +0100

    api/graph: Forward error response from the graph API
    
    If the request sent to the graph API returns an error, forward
    the raw error response as the Web API response instead of trying
    to parse a JSON response that usually fails.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1286/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1286/console

Harbormaster returned this revision to the author for changes because remote builds failed.Jan 11 2022, 5:02 PM
Harbormaster failed remote builds in B25939: Diff 25064!

Build is green

Patch application report for D6918 (id=25064)

Rebasing onto e0a181daf4...

Current branch diff-target is up to date.
Changes applied before test
commit 15e6e1988a5667631bfc1c9585b0d710e27ad6be
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Jan 11 16:38:15 2022 +0100

    api/graph: Forward error response from the graph API
    
    If the request sent to the graph API returns an error, forward
    the raw error response as the Web API response instead of trying
    to parse a JSON response that usually fails.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1287/ for more details.

This revision is now accepted and ready to land.Jan 11 2022, 5:25 PM