Project

General

Profile

Actions

Idea #20927

open

When validating a remote token, translate transient network errors to a 5xx status

Added by Brett Smith 8 months ago. Updated 8 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
Start date:
08/25/2023
Due date:
08/25/2023 (about 8 months late)
Story points:
-

Description

In ApiClientAuthorization::validate, when the method makes remote API calls to validate the token, if there is a transient network error, eventually the method will return nil to indicate authorization failed, and the client will get 401 Unauthorized back.

It would be better to return a 5xx status code so the client knows the problem is temporary and they can retry. Make that happen.

One possibility is to catch the network exceptions, then raise an exception with an http_status method that returns the desired status code. See the current handling of HTTPClient::BadResponseError in the method for an example. The ArvadosApiToken will report that information back to the client.


Related issues

Follows Arvados - Bug #20750: collection sharing tokens shouldn't leak account info of the person sharing (user/currrent)ResolvedBrett Smith08/24/2023Actions
Actions #1

Updated by Brett Smith 8 months ago

  • Follows Bug #20750: collection sharing tokens shouldn't leak account info of the person sharing (user/currrent) added
  • Start date set to 08/25/2023
  • Due date set to 08/25/2023
Actions

Also available in: Atom PDF