Better Enrollment

Error codes

Every APIError code the plugin can return.

Errors are Better Auth APIErrors carrying a code and a message:

import { INVITE_ERROR_CODES } from "@octopi-ai/better-enrollment";
CodeWhen
INVITE_NOT_FOUNDUnknown or no longer valid token
INVITE_EXPIRED, INVITE_REVOKED, INVITE_ALREADY_USEDTerminal states
EMAIL_ALREADY_INVITEDA pending invite already holds that address
USER_ALREADY_EXISTSThat address already has an account
INVALID_ROLE, ROLE_NO_LONGER_VALIDRole rejected at create, or at redeem
ROLE_NOT_ALLOWED_FOR_ORG_JOINorg-join invites cannot set an app role
NOT_ALLOWED_TO_MANAGE_INVITESFailed the admin gate
EMAIL_MISMATCH, EMAIL_NOT_VERIFIEDOpen-mode activation guards
SEAT_LIMIT_REACHEDNo seats left, at create or at redeem
ORG_INVITE_NOT_ALLOWEDNot permitted to invite into that organization
ORG_DISABLEDThe organization is disabled
ORG_SLUG_TAKENSlug collision while founding an organization
USER_BANNEDBanned accounts cannot redeem

Last updated on