There were some calls to Delta that didn't request.raise_for_status() and so there would be an attempt to parse the body even though there wasn't one.
This was noticed for example when a forge instance would have its token expire and some error codes in requests would not be checked, the body would be parsed, and a json error would be thrown.
For all requests.___ calls, the same _catch_http_error is being called. This also improves code readability to avoid having the the same try-except block repeated across the file.
There were some calls to Delta that didn't
request.raise_for_status()
and so there would be an attempt to parse the body even though there wasn't one. This was noticed for example when a forge instance would have its token expire and some error codes in requests would not be checked, the body would be parsed, and a json error would be thrown.For all
requests.___
calls, the same_catch_http_error
is being called. This also improves code readability to avoid having the the same try-except block repeated across the file.Adresses https://github.com/BlueBrain/nexus-forge/issues/164