mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 04:41:26 -07:00
Change handle_httperror in httpapi plugins (#53391)
* Change return of handle_httperror * Fix restconf for handle_httperror changes
This commit is contained in:
parent
662dd2c1de
commit
3fe2013b3f
4 changed files with 27 additions and 30 deletions
|
@ -277,9 +277,9 @@ class Connection(NetworkConnectionBase):
|
|||
if is_handled is True:
|
||||
return self.send(path, data, **kwargs)
|
||||
elif is_handled is False:
|
||||
raise AnsibleConnectionFailure('Could not connect to {0}: {1}'.format(self._url + path, exc.reason))
|
||||
else:
|
||||
raise
|
||||
else:
|
||||
response = is_handled
|
||||
except URLError as exc:
|
||||
raise AnsibleConnectionFailure('Could not connect to {0}: {1}'.format(self._url + path, exc.reason))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue