We're updating the issue view to help you get more done.Learn more

inconsistent error message when username/password is wrong on login

In one case I get 'The provided username/password combination is incorrect.' In the other case I get 'No credentials provided.'. It seems like I should get the former error in both cases.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 >>> syn.login('foo', 'bar') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.5/site-packages/synapseclient/client.py", line 379, in login raise SynapseNoCredentialsError("No credentials provided.") synapseclient.exceptions.SynapseNoCredentialsError: No credentials provided. >>> syn.login('RClientTestUser', 'bar') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.5/site-packages/synapseclient/client.py", line 341, in login self.username, self.apiKey = self._get_login_credentials(email, password, apiKey, sessionToken) File "/usr/local/lib/python3.5/site-packages/synapseclient/client.py", line 404, in _get_login_credentials sessionToken = self._getSessionToken(email=username, password=password) File "/usr/local/lib/python3.5/site-packages/synapseclient/client.py", line 428, in _getSessionToken session = self.restPOST('/session', body=json.dumps(req), endpoint=self.authEndpoint, headers=self.default_headers) File "/usr/local/lib/python3.5/site-packages/synapseclient/client.py", line 3403, in restPOST exceptions._raise_for_status(response, verbose=self.debug) File "/usr/local/lib/python3.5/site-packages/synapseclient/exceptions.py", line 140, in _raise_for_status raise SynapseHTTPError(message, response=response) synapseclient.exceptions.SynapseHTTPError: 401 Client Error: Unauthorized The provided username/password combination is incorrect



Ziming Dong


Bruce Hoff


Bruce Hoff


Fix versions

Affects versions