Project

General

Profile

Actions

Idea #20927

open

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

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

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
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

Also available in: Atom PDF