Skip to content

Instantly share code, notes, and snippets.

@trondhindenes
Created January 28, 2020 21:09
Show Gist options
  • Save trondhindenes/7aba91589b1a8549b40e5d19813104c6 to your computer and use it in GitHub Desktop.
Save trondhindenes/7aba91589b1a8549b40e5d19813104c6 to your computer and use it in GitHub Desktop.
# Change line 138/139 from
# except AuthenticationError:
# raise AnsibleError('Invalid credentials provided.')
#to:
except AuthenticationError as e:
raise AnsibleError(str(e))
#This will surface the actual exception from azure, instead of just printing a generic one.
#It might be possible to use `(e)` instead of `(str(e))` depending on what param AnsibleError takes. It might provide more info
@trondhindenes
Copy link
Author

Glad to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment