Skip to content
Snippets Groups Projects

proposal: Use object not found response http code 404 when no object is found

Closed Antoine R. Dumont requested to merge mr/make-objnotfounderror-return-404 into master
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
@@ -55,7+55,7 @@
class ObjStorageServerApp(RPCServerApp):
client_exception_classes = (
Error,
NoBackendsLeftError,
ObjCorruptedError,
@@ -86,7+86,7 @@
objstorage = None
@app.errorhandler(Error)
@app.errorhandler(ObjNotFoundError)
def argument_error_handler(exception):
return error_handler(exception, encode_data, status_code=404)
@app.errorhandler(Error)
def objnotfound_error_handler(exception):
return error_handler(exception, encode_data, status_code=400)
Loading