You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't try to parse the response json when not_modified
In case of not_modified (HTTP 304), there is no json in the response
body. Json parsing fails like:
```python
if response.status_code == requests.codes.not_modified:
if kwargs.get("ignore", False):
return
body = response
> raise APIError(body["cause"], response=response, explanation=body)
E TypeError: 'APIResponse' object is not subscriptable
.venv/lib/python3.12/site-packages/podman/domain/containers.py:477: TypeError
```
This patch fixes this in the way that APIError is rised with content
from the text of the requests response
Signed-off-by: Jaroslav Henner <[email protected]>
0 commit comments