Skip to content

Commit

Permalink
raise exception if not success
Browse files Browse the repository at this point in the history
  • Loading branch information
mahirchavda authored Mar 20, 2024
1 parent 996d366 commit b49250e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def get_access_token(helper, application_id, secret, tenant):
)
if resp.status_code not in (201, 200):
helper.log_error("Failed to get access_token. status_code={}, resp={}".format(resp.status_code, resp.text))
resp.raise_for_status()
access_token = resp.json()
return access_token[ACCESS_TOKEN]

Expand Down

0 comments on commit b49250e

Please sign in to comment.