Skip to content

Errors

Errors return a JSON body with an error (and often a human-readable error_description or detail). HTTP status conventions:

StatusMeaning
400Validation / malformed request
401Unauthenticated (missing/invalid token)
403Authenticated but not permitted (e.g. not a member; ORG_SEAL_REQUIRED; tenant conflict)
404Not found (or feature disabled)
409Conflict (duplicate name/key, cycle)

A representative set (RoleConstants.ErrorCodes):

CodeMeaning
ROLE_NOT_FOUNDRole does not exist
ROLE_DUPLICATE_NAME / ROLE_DUPLICATE_KEYName/key already used
ROLE_SYSTEM_PROTECTEDSystem roles can’t be modified/deleted
ROLE_KEY_RESERVEDReserved role key
ROLE_CIRCULAR_REFERENCE / ROLE_HIERARCHY_DEPTH_EXCEEDEDHierarchy violations
ROLE_IN_USE / ROLE_LAST_ADMINCan’t delete a role in use / the last admin role
ROLE_INSUFFICIENT_PERMISSIONCaller lacks permission
ROLE_MUTUAL_EXCLUSIONConflicts with an assigned role (SoD)