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

Moved http status check up to catch more cases #362

Merged
merged 2 commits into from
May 22, 2024

Conversation

jdrowell
Copy link
Contributor

SUMMARY

When using reduced Scopes, some API calls may fail with a 403 if you didn't provide enough scopes for all of the actions being performed. This caused a crash due to some fields not existing in the response, and them being referenced before the check for the http code. I just moved the check a little bit up in the code.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

digital_ocean_droplet

ADDITIONAL INFORMATION

To reproduce the error, just create a new API Key without any droplet Scopes and try to create a new droplet. Other cases relate to specific options used in the create and the scopes that the key has.

Copy link
Collaborator

@mamercad mamercad left a comment

Choose a reason for hiding this comment

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

Thanks for this 🚢

@mamercad mamercad merged commit 06a4636 into ansible-collections:main May 22, 2024
50 of 51 checks passed
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.

None yet

2 participants