Skip to content

Commit

Permalink
ignore status code other than 200 (#1166)
Browse files Browse the repository at this point in the history
Co-authored-by: xuzhang3 <Zhangxu894765>
  • Loading branch information
xuzhang3 authored May 22, 2023
1 parent aa90ed2 commit aa745f3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugins/inventory/azure_rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,10 @@ def _process_queue_batch(self):
status_code = r.get('httpStatusCode')
returned_name = r['name']
result = batch_response_handlers[returned_name]
if status_code != 200:
if status_code == 200:
# FUTURE: error-tolerant operation mode (eg, permissions)
raise AnsibleError("a batched request failed with status code {0}, url {1}".format(status_code, result.url))
# FUTURE: store/handle errors from individual handlers
result.handler(r['content'], **result.handler_args)
# FUTURE: store/handle errors from individual handlers
result.handler(r['content'], **result.handler_args)

def _send_batch(self, batched_requests):
url = '/batch'
Expand Down

0 comments on commit aa745f3

Please sign in to comment.