Skip to content

Commit

Permalink
Fix: Handle http errors with streaming responses for GitHub scripts
Browse files Browse the repository at this point in the history
It is not possible to get the json for errors in streaming responses.
  • Loading branch information
bjoernricks committed Mar 1, 2023
1 parent 0d685f8 commit e592c6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pontos/github/script/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e592c6e

Please sign in to comment.