When invalid credentials are passed to SALClient.authenticate, the exception which is raised is sal.core.exception.InvalidResponse("The server did not return an authentication token"). It would be better if an AuthenticationFailed was raised.
Possible fixes
Ideally _handle_error could be used to address this, but raise an InvalidReponse if the response is both invalid and not a 401 error.
Summary
When invalid credentials are passed to
SALClient.authenticate
, the exception which is raised issal.core.exception.InvalidResponse("The server did not return an authentication token")
. It would be better if anAuthenticationFailed
was raised.Possible fixes
Ideally
_handle_error
could be used to address this, but raise anInvalidReponse
if the response is both invalid and not a 401 error.