Files
wehub-resource-sync f36e2104d8
sep-tests / ragflow_preflight (push) Waiting to run
sep-tests / ragflow_tests_infinity (push) Blocked by required conditions
sep-tests / ragflow_tests_elasticsearch (push) Blocked by required conditions
tests / ragflow_preflight (push) Waiting to run
tests / ragflow_tests_infinity (push) Blocked by required conditions
tests / ragflow_tests_elasticsearch (push) Blocked by required conditions
chore: import upstream snapshot with attribution
2026-07-13 12:16:49 +08:00

21 lines
587 B
Python

class AdminException(Exception):
def __init__(self, message, code=400):
super().__init__(message)
self.code = code
self.message = message
class UserNotFoundError(AdminException):
def __init__(self, username):
super().__init__(f"User '{username}' not found", 404)
class UserAlreadyExistsError(AdminException):
def __init__(self, username):
super().__init__(f"User '{username}' already exists", 409)
class CannotDeleteAdminError(AdminException):
def __init__(self):
super().__init__("Cannot delete admin account", 403)