diff --git a/flat-manager-client b/flat-manager-client index 06cde79..c45d4b6 100755 --- a/flat-manager-client +++ b/flat-manager-client @@ -57,7 +57,7 @@ class ApiError(Exception): try: self.body = json.loads(body) - except: + except (json.JSONDecodeError, TypeError): self.body = {"status": self.status, "error-type": "no-error", "message": "No json error details from server"} def repr(self): @@ -581,7 +581,7 @@ async def publish_build(session, build_url, wait, token): elif current_state == "validating": print("the build is still being validated or held for review") return {} - except: + except json.JSONDecodeError: pass if resp.status != 200: