diff --git a/pymisp/api.py b/pymisp/api.py index a7811a4..d9a5e04 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -3084,7 +3084,8 @@ class PyMISP: except Exception: logger.debug(response.text) if expect_json: - raise PyMISPUnexpectedResponse(f'Unexpected response from server: {response.text}') + error_msg = f'Unexpected response (size: {len(response.text)}) from server: {response.text}' + raise PyMISPUnexpectedResponse(error_msg) if lenient_response_type and not response.headers['Content-Type'].startswith('application/json'): return response.text if not response.content: