Bug #3483

[Keep] Keep uses appropriate HTTP status codes for failed DELETE requests

Added by Tim Pierce over 3 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assigned To:
-
Category:
Keep
Target version:
-
Start date:
08/05/2014
Due date:
% Done:

0%

Estimated time:
Story points:
1.0

Description

When a DELETE request fails because a call to the API server could not be executed successfully, the HTTP status returned by the API server should be passed through to Keep's DELETE response:

  • Respond 403 Forbidden if the token is valid (users.get responds 200) but does not pass is_admin/scopes verification, or users.get responds 403 (which is another scope problem).
  • Respond 401 Unauthorized If the token is invalid (users.get responds 401) (This probably means the token has expired.)
This change will require updating the sdk.ArvadosClient to return more information about why a request failed. Possibilities include:
  • define an ArvadosApiError type that includes the API server HTTP status code
  • change sdk.ArvadosClient.CallRaw to return an HTTP status instead of an error message

History

#1 Updated by Tim Pierce over 3 years ago

  • Description updated (diff)

#2 Updated by Ward Vandewege over 3 years ago

  • Subject changed from Keep uses appropriate HTTP status codes for failed DELETE requests to [Keep] Keep uses appropriate HTTP status codes for failed DELETE requests

#3 Updated by Ward Vandewege over 3 years ago

  • Story points set to 1.0

#4 Updated by Tim Pierce over 3 years ago

  • Assigned To set to Tim Pierce

#5 Updated by Tom Clegg over 3 years ago

  • Target version changed from 2014-08-27 Sprint to Arvados Future Sprints

#6 Updated by Tom Clegg almost 3 years ago

215372746216e1c348231b6585a6e0fb9c505af4 makes the HTTP status code (and error messages!) available to the caller after an API error.

#7 Updated by Tom Clegg almost 3 years ago

  • Assigned To deleted (Tim Pierce)

#8 Updated by Tom Clegg 9 months ago

  • Status changed from New to Closed

#9 Updated by Tom Clegg 9 months ago

  • Target version deleted (Arvados Future Sprints)

Also available in: Atom PDF