mirror of https://github.com/MISP/PyMISP
Improve the exception message for a server 500+ response with no response content
parent
8a8b0c113d
commit
748be6a093
|
@ -224,7 +224,7 @@ class PyMISP(object):
|
|||
errors = []
|
||||
if response.status_code >= 500:
|
||||
if len(response.content) == 0:
|
||||
raise PyMISPError('Something bad happened on the server-side and there was no content to be decoded')
|
||||
raise PyMISPError('Something bad happened on the server-side, but there was no response content to be decoded')
|
||||
else:
|
||||
errors.append(response.json())
|
||||
logger.critical('Something bad happened on the server-side: {}'.format(response.json()))
|
||||
|
|
Loading…
Reference in New Issue