error_codes: added NOT_BATON_HOLDER error code and helper
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user