IBM / redstone

A Pythonic IBM Cloud SDK
Apache License 2.0
4 stars 9 forks source link

Handle non-json response from KP #3

Closed ghost closed 3 years ago

ghost commented 3 years ago

When KP returns a non-json response (usually 503 Service Unavailable or 429 Too Many Requests), this code will break. It may be better to handle it more cleanly by catching JSONDecodeError

https://github.com/IBM/redstone/blob/e232ab6cf720c4269fc144151b43e7a6a746def6/redstone/client.py#L480-L483

mrodden commented 3 years ago

Oops, good catch