Failure on login gives an ugly error message

Description

syn.login('chris.bare') when you don't have a api-key cached gives an ugly error message. We should not be advised to first login when login fails. We might want fail better before getting the userProfile,

/usr/local/lib/python2.7/dist-packages/synapseclient/client.pyc in login(self, email, password, apiKey, sessionToken, rememberMe, silent)
346
347 if not silent:
--> 348 profile = self.getUserProfile(refresh=True)
349 sys.stdout.write("Welcome, %s!\n" % (profile['displayName'] if 'displayName' in profile else self.username))
350

.
.
.
SynapseAuthenticationError: Please login

Environment

None

Status

Assignee

Chris Bare

Reporter

Larsson Omberg

Labels

None

Validator

Larsson Omberg

Release Version History

None

Components

Fix versions

Priority

Minor
Configure