mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 19:26:53 +00:00
fixed the error handling for 404
This commit is contained in:
parent
dda6d2f5a8
commit
bace82c84f
@ -105,11 +105,8 @@ class API(object):
|
||||
return self.handle_response(response)
|
||||
|
||||
def handle_response_404(self, response, prefix):
|
||||
# Stripping HTML body ...
|
||||
if response.text.find('body'):
|
||||
msg = response.text.split('<body>')[1].split('</body>')[0]
|
||||
msg = '{} {}: {}'.format(
|
||||
prefix, response.status_code, msg)
|
||||
prefix, response.status_code, response.text)
|
||||
log(logging.ERROR, msg)
|
||||
raise APIError(msg)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user