Skip to content

Commit

Permalink
Merge pull request #376 from balena-io/print-stack-error-only-on-5xx
Browse files Browse the repository at this point in the history
Avoid displaying 4xx errors that might be handled internally
  • Loading branch information
flowzone-app[bot] authored Dec 12, 2024
2 parents 2918832 + 3bf4272 commit 7b7fd5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion balena/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ def __init__(self, body, status_code=None):
self.message = Message.REQUEST_ERROR.format(body=body)
self.body = body
self.status_code = status_code
print(self.message, status_code)
if status_code >= 500:
print(self.message, status_code)


class NotLoggedIn(BalenaException):
Expand Down

0 comments on commit 7b7fd5b

Please sign in to comment.