When validating a remote token, translate transient network errors to a 5xx status
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.