better-auth
Version:
The most comprehensive authentication framework for TypeScript.
1 lines • 2.29 kB
Source Map (JSON)
{"version":3,"file":"error-codes.mjs","names":[],"sources":["../../../src/plugins/admin/error-codes.ts"],"sourcesContent":["// NOTE: Error code const must be all capital of string (ref https://github.com/better-auth/better-auth/issues/4386)\nimport { defineErrorCodes } from \"@better-auth/core/utils\";\n\nexport const ADMIN_ERROR_CODES = defineErrorCodes({\n\tFAILED_TO_CREATE_USER: \"Failed to create user\",\n\tUSER_ALREADY_EXISTS: \"User already exists.\",\n\tUSER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:\n\t\t\"User already exists. Use another email.\",\n\tYOU_CANNOT_BAN_YOURSELF: \"You cannot ban yourself\",\n\tYOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:\n\t\t\"You are not allowed to change users role\",\n\tYOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: \"You are not allowed to create users\",\n\tYOU_ARE_NOT_ALLOWED_TO_LIST_USERS: \"You are not allowed to list users\",\n\tYOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:\n\t\t\"You are not allowed to list users sessions\",\n\tYOU_ARE_NOT_ALLOWED_TO_BAN_USERS: \"You are not allowed to ban users\",\n\tYOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:\n\t\t\"You are not allowed to impersonate users\",\n\tYOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:\n\t\t\"You are not allowed to revoke users sessions\",\n\tYOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: \"You are not allowed to delete users\",\n\tYOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:\n\t\t\"You are not allowed to set users password\",\n\tBANNED_USER: \"You have been banned from this application\",\n\tYOU_ARE_NOT_ALLOWED_TO_GET_USER: \"You are not allowed to get user\",\n\tNO_DATA_TO_UPDATE: \"No data to update\",\n\tYOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: \"You are not allowed to update users\",\n\tYOU_CANNOT_REMOVE_YOURSELF: \"You cannot remove yourself\",\n\tYOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE:\n\t\t\"You are not allowed to set a non-existent role value\",\n\tYOU_CANNOT_IMPERSONATE_ADMINS: \"You cannot impersonate admins\",\n\tINVALID_ROLE_TYPE: \"Invalid role type\",\n});\n"],"mappings":";;;AAGA,MAAa,oBAAoB,iBAAiB;CACjD,uBAAuB;CACvB,qBAAqB;CACrB,uCACC;CACD,yBAAyB;CACzB,0CACC;CACD,qCAAqC;CACrC,mCAAmC;CACnC,4CACC;CACD,kCAAkC;CAClC,0CACC;CACD,8CACC;CACD,qCAAqC;CACrC,2CACC;CACD,aAAa;CACb,iCAAiC;CACjC,mBAAmB;CACnB,qCAAqC;CACrC,4BAA4B;CAC5B,+CACC;CACD,+BAA+B;CAC/B,mBAAmB;CACnB,CAAC"}