-
Notifications
You must be signed in to change notification settings - Fork 33
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
TDL-14890: Print user friendly error messages #65
base: master
Are you sure you want to change the base?
Conversation
tap_exacttarget/client.py
Outdated
@@ -61,7 +61,7 @@ def get_auth_stub(config): | |||
LOGGER.info('Failed to auth using V1 endpoint') | |||
if not config.get('tenant_subdomain'): | |||
LOGGER.warning('No tenant_subdomain found, will not attempt to auth with V2 endpoint') | |||
raise e | |||
raise Exception(str(e) + ". Please check your \'client_id\', \'client_secret\' or try adding the \'tenant_subdomain\'.") from None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the format here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
tap_exacttarget/client.py
Outdated
@@ -61,7 +61,8 @@ def get_auth_stub(config): | |||
LOGGER.info('Failed to auth using V1 endpoint') | |||
if not config.get('tenant_subdomain'): | |||
LOGGER.warning('No tenant_subdomain found, will not attempt to auth with V2 endpoint') | |||
raise e | |||
message = "{}. Please check your \'client_id\', \'client_secret\' or try adding the \'tenant_subdomain\'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use f-string instead of format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
tap_exacttarget/client.py
Outdated
@@ -77,7 +78,8 @@ def get_auth_stub(config): | |||
transport=transport) | |||
except Exception as e: | |||
LOGGER.info('Failed to auth using V2 endpoint') | |||
raise e | |||
message = "{}. Please check your \'client_id\', \'client_secret\' or \'tenant_subdomain\'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use f-string instead of format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Description of change
TDL-14890: Print user-friendly error messages
Manual QA steps
Risks
Rollback steps