From 3bf42720736d8c3035416fb089c9cb3a02b08a4c Mon Sep 17 00:00:00 2001 From: Otavio Jacobi Date: Thu, 12 Dec 2024 18:40:51 -0300 Subject: [PATCH] Avoid displaying 4xx errors that might be handled internally Change-type: patch --- balena/exceptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/balena/exceptions.py b/balena/exceptions.py index cf570164..54437401 100644 --- a/balena/exceptions.py +++ b/balena/exceptions.py @@ -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):