Page MenuHomeSoftware Heritage

Handle ObjNotFoundError and Error as client errors instead of server errors.
ClosedPublic

Authored by vlorentz on Feb 18 2020, 1:39 PM.

Details

Summary

Meaning that:

  • server should raise 400 on these errors instead of 500
  • client should catch them and re-raise them.
Test Plan

Tests will fail because this diff depends on D2687.

Diff Detail

Repository
rDOBJS Object storage
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert added a subscriber: anlambert.
anlambert added inline comments.
swh/objstorage/api/client.py
1

2020

swh/objstorage/api/server.py
1

2020

This revision is now accepted and ready to land.Feb 18 2020, 1:51 PM