PHONE_NUMBER_ERROR_CODES (phone-number/error-codes.ts)

better-auth · packages/better-auth/src/plugins/phone-number/error-codes.ts · typescript · MIT
auth, tag:embed-classified

Defines phone number error codes for authentication plugin.

// Source: https://github.com/better-auth/better-auth | License: MIT | Copyright 2024 - present, Bereket Engida
// Provided via justclaw.it.com; keep this notice with the code.
import { defineErrorCodes } from "@better-auth/core/utils/error-codes";

export const PHONE_NUMBER_ERROR_CODES = defineErrorCodes({
	INVALID_PHONE_NUMBER: "Invalid phone number",
	PHONE_NUMBER_EXIST: "Phone number already exists",
	PHONE_NUMBER_NOT_EXIST: "phone number isn't registered",
	INVALID_PHONE_NUMBER_OR_PASSWORD: "Invalid phone number or password",
	UNEXPECTED_ERROR: "Unexpected error",
	OTP_NOT_FOUND: "OTP not found",
	OTP_EXPIRED: "OTP expired",
	INVALID_OTP: "Invalid OTP",
	PHONE_NUMBER_NOT_VERIFIED: "Phone number not verified",
	PHONE_NUMBER_CANNOT_BE_UPDATED: "Phone number cannot be updated",
	SEND_OTP

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key