Skip to content

Conversation

@alannix-lw
Copy link
Contributor

@alannix-lw alannix-lw requested a review from hazedav March 20, 2021 05:06
if response:
raise ApiError(response)
else:
logger.error("Call to _get_access_token() returned no response.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we raise an exception no matter what? Just raise a fancier Exception (ApiError) if we have a response?

except Exception:
    if response:
        raise ApiError(response)
    raise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, of course - thank you!

@alannix-lw alannix-lw force-pushed the alannix-lw/response-exception-fix branch from 100d567 to 9ce4309 Compare March 22, 2021 16:58
Copy link
Collaborator

@hazedav hazedav left a comment

Choose a reason for hiding this comment

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

LGTM

@alannix-lw alannix-lw merged commit c3a9d1e into master Mar 22, 2021
@alannix-lw alannix-lw deleted the alannix-lw/response-exception-fix branch March 22, 2021 18:32
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.

3 participants