digital_ocean_droplet
action raises python error when api returns 500
#192
Labels
bug
Something isn't working
SUMMARY
When API returns 500 status,
digital_ocean_droplet
withaction: create
raises python error.ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
MacBookAir10,1 (M1, aarch64)
Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64
STEPS TO REPRODUCE
You can't reproduce actual API failure, but it can be reproduced by mocking response with code 500 and body:
Raised
'NoneType' object has no attribute 'get'
Stacktrace points to:
community.digitalocean/plugins/modules/digital_ocean_droplet.py
Line 708 in 3e81f0c
I suppose
status_code
should be checked beforedroplet
anddroplet_id
are fetched from responseThanks!
The text was updated successfully, but these errors were encountered: