Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Change error to warning if TOS not accepted (#12605)

mamoodi7ad0eec325c9
diff --git a/enterprise/server/middleware.py b/enterprise/server/middleware.py
index 661493d7db..5747458dfc 100644
--- a/enterprise/server/middleware.py
+++ b/enterprise/server/middleware.py
@@ -144,7 +144,7 @@ class SetAuthCookieMiddleware:
# "if accepted_tos is not None" as there should not be any users with
# accepted_tos equal to "None"
if accepted_tos is False and request.url.path != '/api/accept_tos':
- logger.error('User has not accepted the terms of service')
+ logger.warning('User has not accepted the terms of service')
raise TosNotAcceptedError
def _should_attach(self, request: Request) -> bool: