Crash when 4xx HTTP error is raised by a reverse proxy
Sentry Issue: SWH-LOADER-CORE-1JA
TypeError: string indices must be integers
(15 additional frame(s) were not displayed)
...
File "swh/storage/api/client.py", line 53, in content_add
return self._post("content/add", {"content": content})
File "swh/core/api/__init__.py", line 285, in _post
return self._decode_response(response)
File "swh/core/api/__init__.py", line 367, in _decode_response
self.raise_for_status(response)
File "swh/storage/api/client.py", line 37, in raise_for_status
super().raise_for_status(response)
File "swh/core/api/__init__.py", line 338, in raise_for_status
if exc_type.__name__ == exc_data["type"]:
exc_data
is: '<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<body bgcolor="white">\r\n<center><h1>413 Request Entity Too Large</h1></center>\r\n<hr><center>nginx/1.14.2</center>\r\n</body>\r\n</html>\r\n'