From 53608f917a73fc592ada56d92a75d89a5dd66abf Mon Sep 17 00:00:00 2001 From: appleb_m Date: Fri, 27 Mar 2026 17:08:35 +0100 Subject: [PATCH] error_codes: added NOT_BATON_HOLDER error code and helper --- src/aare/common/error_codes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aare/common/error_codes.py b/src/aare/common/error_codes.py index d4247300..9179291b 100644 --- a/src/aare/common/error_codes.py +++ b/src/aare/common/error_codes.py @@ -25,6 +25,7 @@ class AuthErrorCode(StrEnum): # Authorization NOT_STAFF = "NOT_STAFF" NOT_IN_ACTIVE_PGROUP = "NOT_IN_ACTIVE_PGROUP" + NOT_BATON_HOLDER = "NOT_BATON_HOLDER" class DAQErrorCode(StrEnum): @@ -48,6 +49,8 @@ _ERROR_CODE_HELP: dict[str, str] = { "A different session currently owns control. Use “force current session” (if allowed) " "or wait for the active session to expire/end." ), + AuthErrorCode.NOT_BATON_HOLDER: ( + "A different session currently owns the baton. Request the baton or wait for active session to expire/end"), # Authorization AuthErrorCode.FORBIDDEN: ( "Generic permissions failure. The user is authenticated but not allowed to perform this action."