Skip to content

Commit

Permalink
Avoid displaying 4xx errors that might be handled internally
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
otaviojacobi committed Dec 12, 2024
1 parent 2918832 commit 3bf4272
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 3bf4272

Please sign in to comment.