From e592c6e8e14140281f39a783e3f5a22c630f2141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 1 Mar 2023 13:27:31 +0100 Subject: [PATCH] Fix: Handle http errors with streaming responses for GitHub scripts It is not possible to get the json for errors in streaming responses. --- pontos/github/script/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pontos/github/script/__init__.py b/pontos/github/script/__init__.py index 879f6a035..a87c0bb09 100644 --- a/pontos/github/script/__init__.py +++ b/pontos/github/script/__init__.py @@ -91,6 +91,9 @@ def main(): except json.JSONDecodeError: # not a json response print(e, file=sys.stderr) + except httpx.ResponseNotRead: + # a streaming response failed + print(e, file=sys.stderr) sys.exit(1) except PontosError as e: