Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent exceptions during login from killing the thread #20

Merged
merged 3 commits into from
Dec 19, 2017

Conversation

KAllan357
Copy link
Contributor

Don't let an exception during the POST to kill the thread and prevent it from executing another login.

Copy link
Contributor

@dmosorast dmosorast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment.

self.access_token = auth['access_token']
self.instance_url = auth['instance_url']
except Exception as e:
raise Exception(str(e) + ", Response from Salesforce: {}".format(resp.text)) from e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resp.text could possibly throw if session.post throws to get us into this. It's very useful information if it exists, maybe move it into an "if exists" check and add it on if so?

@KAllan357 KAllan357 merged commit af2aef1 into master Dec 19, 2017
@KAllan357 KAllan357 deleted the fix-login-exceptions branch December 19, 2017 14:21
@MikeS-nth MikeS-nth mentioned this pull request Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants