Skip to content

Commit

Permalink
adding CvpRequestError 403 handling for apply image
Browse files Browse the repository at this point in the history
  • Loading branch information
noredistribution committed Nov 14, 2023
1 parent b0c99be commit df7a9c0
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,13 @@ def apply_bundle(self, user_inventory: DeviceInventory):
self.__ansible.fail_json(
msg=f"Error applying bundle to device {device.fqdn}: {str(catch_error)}"
)
except CvpRequestError as catch_error:
MODULE_LOGGER.error(
"Error applying bundle to device: %s", str(catch_error)
)
self.__ansible.fail_json(
msg=f"Error applying bundle to device {device.fqdn}: {str(catch_error)}"
)
else:
if resp and resp["data"]["status"] == "success":
result_data.changed = True
Expand Down

0 comments on commit df7a9c0

Please sign in to comment.