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

TDL-14890: Print user friendly error messages #65

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

hpatel41
Copy link
Contributor

Description of change

TDL-14890: Print user-friendly error messages

  • Updated error message during generating the 'auth_stub'

Manual QA steps

Risks

Rollback steps

  • revert this branch

@hpatel41 hpatel41 marked this pull request as ready for review August 27, 2021 09:33
@@ -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

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@dbshah1212 dbshah1212 self-requested a review August 30, 2021 12:04
@@ -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\'."

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -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\'."

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

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.

4 participants