{"version":3,"file":"error-uYOdvTDm.mjs","names":[],"sources":["../../src/errors/clerkApiError.ts","../../src/errors/parseError.ts","../../src/errors/clerkApiResponseError.ts","../../src/errors/missingExpiredTokenError.ts","../../src/errors/clerkOfflineError.ts","../../src/errors/errorThrower.ts","../../src/errors/emailLinkError.ts","../../src/errors/webAuthNError.ts","../../src/errors/helpers.ts","../../src/errors/globalHookError.ts"],"sourcesContent":["import type { ClerkAPIError as ClerkAPIErrorInterface, ClerkAPIErrorJSON } from '../types';\nimport { createErrorTypeGuard } from './createErrorTypeGuard';\n\nexport type ClerkAPIErrorMeta = Record<string, unknown>;\n\n/**\n * This error contains the specific error message, code, and any additional metadata that was returned by the Clerk API.\n */\nexport class ClerkAPIError<Meta extends ClerkAPIErrorMeta = any> implements ClerkAPIErrorInterface {\n  static kind = 'ClerkAPIError';\n  readonly code: string;\n  readonly message: string;\n  readonly longMessage: string | undefined;\n  readonly meta: Meta;\n\n  constructor(json: ClerkAPIErrorJSON) {\n    const parsedError = {\n      code: json.code,\n      message: json.message,\n      longMessage: json.long_message,\n      meta: {\n        paramName: json.meta?.param_name,\n        sessionId: json.meta?.session_id,\n        emailAddresses: json.meta?.email_addresses,\n        identifiers: json.meta?.identifiers,\n        zxcvbn: json.meta?.zxcvbn,\n        plan: json.meta?.plan,\n        isPlanUpgradePossible: json.meta?.is_plan_upgrade_possible,\n        seatsQuantityToAdd: json.meta?.seats_quantity_to_add,\n        seatsQuantity: json.meta?.seats_quantity,\n      } as unknown as Meta,\n    };\n    this.code = parsedError.code;\n    this.message = parsedError.message;\n    this.longMessage = parsedError.longMessage;\n    this.meta = parsedError.meta;\n  }\n}\n\n/**\n * Type guard to check if a value is a ClerkAPIError instance.\n */\nexport const isClerkAPIError = createErrorTypeGuard(ClerkAPIError);\n","import type { ClerkAPIError as ClerkAPIErrorInterface, ClerkAPIErrorJSON } from '../types';\nimport { ClerkAPIError } from './clerkApiError';\n\n/**\n * Parses an array of ClerkAPIErrorJSON objects into an array of ClerkAPIError objects.\n *\n * @internal\n */\nexport function parseErrors(data: ClerkAPIErrorJSON[] = []): ClerkAPIErrorInterface[] {\n  return data.length > 0 ? data.map(e => new ClerkAPIError(e)) : [];\n}\n\n/**\n * Parses a ClerkAPIErrorJSON object into a ClerkAPIError object.\n *\n * @deprecated Use `ClerkAPIError` class instead\n *\n * @internal\n */\nexport function parseError(error: ClerkAPIErrorJSON): ClerkAPIErrorInterface {\n  return new ClerkAPIError(error);\n}\n\n/**\n * Converts a ClerkAPIError object into a ClerkAPIErrorJSON object.\n *\n * @internal\n */\nexport function errorToJSON(error: ClerkAPIError | null): ClerkAPIErrorJSON {\n  return {\n    code: error?.code || '',\n    message: error?.message || '',\n    long_message: error?.longMessage,\n    meta: {\n      param_name: error?.meta?.paramName,\n      session_id: error?.meta?.sessionId,\n      email_addresses: error?.meta?.emailAddresses,\n      identifiers: error?.meta?.identifiers,\n      zxcvbn: error?.meta?.zxcvbn,\n      plan: error?.meta?.plan,\n      is_plan_upgrade_possible: error?.meta?.isPlanUpgradePossible,\n      seats_quantity_to_add: error?.meta?.seatsQuantityToAdd,\n      seats_quantity: error?.meta?.seatsQuantity,\n    },\n  };\n}\n","import type { ClerkAPIErrorJSON, ClerkAPIResponseError as ClerkAPIResponseErrorInterface } from '../types';\nimport { ClerkAPIError } from './clerkApiError';\nimport type { ClerkErrorParams } from './clerkError';\nimport { ClerkError } from './clerkError';\nimport { createErrorTypeGuard } from './createErrorTypeGuard';\n\ninterface ClerkAPIResponseOptions extends Omit<ClerkErrorParams, 'message' | 'code'> {\n  data: ClerkAPIErrorJSON[];\n  status: number;\n  clerkTraceId?: string;\n  retryAfter?: number;\n}\n\nexport class ClerkAPIResponseError extends ClerkError implements ClerkAPIResponseErrorInterface {\n  static kind = 'ClerkAPIResponseError';\n  status: number;\n  clerkTraceId?: string;\n  retryAfter?: number;\n  errors: ClerkAPIError[];\n\n  constructor(message: string, options: ClerkAPIResponseOptions) {\n    const { data: errorsJson, status, clerkTraceId, retryAfter } = options;\n    super({ ...options, message, code: 'api_response_error' });\n    Object.setPrototypeOf(this, ClerkAPIResponseError.prototype);\n    this.status = status;\n    this.clerkTraceId = clerkTraceId;\n    this.retryAfter = retryAfter;\n    this.errors = (errorsJson || []).map(e => new ClerkAPIError(e));\n  }\n\n  public toString() {\n    let message = `[${this.name}]\\nMessage:${this.message}\\nStatus:${this.status}\\nSerialized errors: ${this.errors.map(\n      e => JSON.stringify(e),\n    )}`;\n\n    if (this.clerkTraceId) {\n      message += `\\nClerk Trace ID: ${this.clerkTraceId}`;\n    }\n\n    return message;\n  }\n\n  // Override formatMessage to keep it unformatted for backward compatibility\n  protected static override formatMessage(name: string, msg: string, _: string, __: string | undefined) {\n    return msg;\n  }\n}\n\n/**\n * Type guard to check if an error is a ClerkAPIResponseError.\n * Can be called as a standalone function or as a method on an error object.\n *\n * @example\n * // As a standalone function\n * if (isClerkAPIResponseError(error)) { ... }\n *\n * // As a method (when attached to error object)\n * if (error.isClerkAPIResponseError()) { ... }\n */\nexport const isClerkAPIResponseError = createErrorTypeGuard(ClerkAPIResponseError);\n","import { ClerkAPIResponseError, isClerkAPIResponseError } from './clerkApiResponseError';\n\n/**\n * Error class representing a missing expired token error from the API.\n * This error occurs when the server requires an expired token to mint a new session token.\n *\n * Use the static `is` method to check if a ClerkAPIResponseError matches this error type.\n *\n * @example\n * ```typescript\n * if (MissingExpiredTokenError.is(error)) {\n *   // Handle the missing expired token error\n * }\n * ```\n */\nexport class MissingExpiredTokenError extends ClerkAPIResponseError {\n  static kind = 'MissingExpiredTokenError';\n  static readonly ERROR_CODE = 'missing_expired_token' as const;\n  static readonly STATUS = 422 as const;\n\n  /**\n   * Type guard to check if an error is a MissingExpiredTokenError.\n   * This checks the error's properties (status and error code) rather than instanceof,\n   * allowing it to work with ClerkAPIResponseError instances thrown from the API layer.\n   *\n   * @example\n   * ```typescript\n   * try {\n   *   await someApiCall();\n   * } catch (e) {\n   *   if (MissingExpiredTokenError.is(e)) {\n   *     // e is typed as ClerkAPIResponseError with the specific error properties\n   *   }\n   * }\n   * ```\n   */\n  static is(err: unknown): err is ClerkAPIResponseError {\n    return (\n      isClerkAPIResponseError(err) &&\n      err.status === MissingExpiredTokenError.STATUS &&\n      err.errors.length > 0 &&\n      err.errors[0].code === MissingExpiredTokenError.ERROR_CODE\n    );\n  }\n}\n","import { ClerkRuntimeError, isClerkRuntimeError } from './clerkRuntimeError';\n\n/**\n * Error thrown when a network request fails due to the client being offline.\n *\n * This error is thrown instead of returning `null` to make it explicit that\n * the failure was due to network conditions, not authentication state.\n *\n * @example\n * ```typescript\n * try {\n *   const token = await session.getToken();\n * } catch (error) {\n *   if (ClerkOfflineError.is(error)) {\n *     // Handle offline scenario\n *     showOfflineScreen();\n *   }\n * }\n * ```\n */\nexport class ClerkOfflineError extends ClerkRuntimeError {\n  static kind = 'ClerkOfflineError';\n  static readonly ERROR_CODE = 'clerk_offline' as const;\n\n  constructor(message: string) {\n    super(message, { code: ClerkOfflineError.ERROR_CODE });\n    Object.setPrototypeOf(this, ClerkOfflineError.prototype);\n  }\n\n  /**\n   * Type guard to check if an error is a ClerkOfflineError.\n   * This checks both instanceof and the error code to support cross-bundle/cross-realm errors\n   *\n   * @example\n   * ```typescript\n   * try {\n   *   const token = await session.getToken();\n   * } catch (error) {\n   *   if (ClerkOfflineError.is(error)) {\n   *     // error is typed as ClerkOfflineError\n   *     console.log('User is offline');\n   *   }\n   * }\n   * ```\n   */\n  static is(error: unknown): error is ClerkOfflineError {\n    if (error === null || error === undefined) {\n      return false;\n    }\n    return (\n      error instanceof ClerkOfflineError || (isClerkRuntimeError(error) && error.code === ClerkOfflineError.ERROR_CODE)\n    );\n  }\n}\n","const DefaultMessages = Object.freeze({\n  InvalidProxyUrlErrorMessage: `The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})`,\n  InvalidPublishableKeyErrorMessage: `The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})`,\n  MissingPublishableKeyErrorMessage: `Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,\n  MissingSecretKeyErrorMessage: `Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,\n  MissingClerkProvider: `{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider`,\n});\n\ntype MessageKeys = keyof typeof DefaultMessages;\n\ntype Messages = Record<MessageKeys, string>;\n\ntype CustomMessages = Partial<Messages>;\n\nexport type ErrorThrowerOptions = {\n  packageName: string;\n  customMessages?: CustomMessages;\n};\n\nexport interface ErrorThrower {\n  setPackageName(options: ErrorThrowerOptions): ErrorThrower;\n\n  setMessages(options: ErrorThrowerOptions): ErrorThrower;\n\n  throwInvalidPublishableKeyError(params: { key?: string }): never;\n\n  throwInvalidProxyUrl(params: { url?: string }): never;\n\n  throwMissingPublishableKeyError(): never;\n\n  throwMissingSecretKeyError(): never;\n\n  throwMissingClerkProviderError(params: { source?: string }): never;\n\n  throw(message: string): never;\n}\n\n/**\n * Builds an error thrower.\n *\n * @internal\n */\nexport function buildErrorThrower({ packageName, customMessages }: ErrorThrowerOptions): ErrorThrower {\n  let pkg = packageName;\n\n  /**\n   * Builds a message from a raw message and replacements.\n   *\n   * @internal\n   */\n  function buildMessage(rawMessage: string, replacements?: Record<string, string | number>) {\n    if (!replacements) {\n      return `${pkg}: ${rawMessage}`;\n    }\n\n    let msg = rawMessage;\n    const matches = rawMessage.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);\n\n    for (const match of matches) {\n      const replacement = (replacements[match[1]] || '').toString();\n      msg = msg.replace(`{{${match[1]}}}`, replacement);\n    }\n\n    return `${pkg}: ${msg}`;\n  }\n\n  const messages = {\n    ...DefaultMessages,\n    ...customMessages,\n  };\n\n  return {\n    setPackageName({ packageName }: ErrorThrowerOptions): ErrorThrower {\n      if (typeof packageName === 'string') {\n        pkg = packageName;\n      }\n      return this;\n    },\n\n    setMessages({ customMessages }: ErrorThrowerOptions): ErrorThrower {\n      Object.assign(messages, customMessages || {});\n      return this;\n    },\n\n    throwInvalidPublishableKeyError(params: { key?: string }): never {\n      throw new Error(buildMessage(messages.InvalidPublishableKeyErrorMessage, params));\n    },\n\n    throwInvalidProxyUrl(params: { url?: string }): never {\n      throw new Error(buildMessage(messages.InvalidProxyUrlErrorMessage, params));\n    },\n\n    throwMissingPublishableKeyError(): never {\n      throw new Error(buildMessage(messages.MissingPublishableKeyErrorMessage));\n    },\n\n    throwMissingSecretKeyError(): never {\n      throw new Error(buildMessage(messages.MissingSecretKeyErrorMessage));\n    },\n\n    throwMissingClerkProviderError(params: { source?: string }): never {\n      throw new Error(buildMessage(messages.MissingClerkProvider, params));\n    },\n\n    throw(message: string): never {\n      throw new Error(buildMessage(message));\n    },\n  };\n}\n","export class EmailLinkError extends Error {\n  code: string;\n\n  constructor(code: string) {\n    super(code);\n    this.code = code;\n    this.name = 'EmailLinkError' as const;\n    Object.setPrototypeOf(this, EmailLinkError.prototype);\n  }\n}\n\n/**\n * @deprecated Use `EmailLinkErrorCodeStatus` instead.\n *\n * @internal\n */\nexport const EmailLinkErrorCode = {\n  Expired: 'expired',\n  Failed: 'failed',\n  ClientMismatch: 'client_mismatch',\n};\n\nexport const EmailLinkErrorCodeStatus = {\n  Expired: 'expired',\n  Failed: 'failed',\n  ClientMismatch: 'client_mismatch',\n} as const;\n","import type { ClerkErrorParams } from './clerkError';\nimport { ClerkRuntimeError } from './clerkRuntimeError';\n\ntype ClerkWebAuthnErrorCode =\n  // Generic\n  | 'passkey_not_supported'\n  | 'passkey_pa_not_supported'\n  | 'passkey_invalid_rpID_or_domain'\n  | 'passkey_already_exists'\n  | 'passkey_operation_aborted'\n  // Retrieval\n  | 'passkey_retrieval_cancelled'\n  | 'passkey_retrieval_failed'\n  // Registration\n  | 'passkey_registration_cancelled'\n  | 'passkey_registration_failed';\n\ntype ClerkWebAuthnErrorOptions = Omit<ClerkErrorParams, 'message' | 'code'> & { code: ClerkWebAuthnErrorCode };\n\nexport class ClerkWebAuthnError extends ClerkRuntimeError {\n  /**\n   * A unique code identifying the error, can be used for localization.\n   */\n  code: ClerkWebAuthnErrorCode;\n\n  constructor(message: string, options: ClerkWebAuthnErrorOptions) {\n    super(message, options);\n    this.code = options.code;\n  }\n}\n","import type { ClerkAPIResponseError } from './clerkApiResponseError';\nimport { isClerkAPIResponseError } from './clerkApiResponseError';\nimport type { ClerkRuntimeError } from './clerkRuntimeError';\nimport { isClerkRuntimeError } from './clerkRuntimeError';\nimport type { EmailLinkError } from './emailLinkError';\nimport type { MetamaskError } from './metamaskError';\n\n/**\n * Checks if the provided error object is an unauthorized error.\n *\n * @internal\n *\n * @deprecated This is no longer used, and will be removed in the next major version.\n */\nexport function isUnauthorizedError(e: any): boolean {\n  const status = e?.status;\n  const code = e?.errors?.[0]?.code;\n  return code === 'authentication_invalid' && status === 401;\n}\n\n/**\n * Checks if the provided error object is a captcha error.\n *\n * @internal\n */\nexport function isCaptchaError(e: ClerkAPIResponseError): boolean {\n  return ['captcha_invalid', 'captcha_not_enabled', 'captcha_missing_token'].includes(e.errors[0].code);\n}\n\n/**\n * Checks if the provided error is a 4xx error.\n *\n * @internal\n */\nexport function is4xxError(e: any): boolean {\n  const status = e?.status;\n  return !!status && status >= 400 && status < 500;\n}\n\n/**\n * Checks if the provided error is a 429 (Too Many Requests) error.\n *\n * @internal\n */\nexport function is429Error(e: any): boolean {\n  return e?.status === 429;\n}\n\nconst unauthenticated403ErrorCodes = new Set(['user_banned', 'user_deactivated']);\n\n/**\n * Checks if the provided error indicates the user's session is no longer valid\n * and should trigger the unauthenticated flow (e.g. sign-out / redirect to sign-in).\n *\n * Only matches explicit authentication failure status codes:\n * - 401: session is invalid or expired\n * - 422: invalid session state (e.g. missing_expired_token)\n * - 403: terminal user state (e.g. user_banned, user_deactivated)\n *\n * 404 is intentionally excluded despite being returned for \"session not found\",\n * because it's also returned for unrelated resources (org not found, JWT template\n * not found) and shares the same `resource_not_found` error code, making it\n * impossible to distinguish. Session-not-found 401s are already handled directly\n * by Base._fetch.\n *\n * @internal\n */\nexport function isUnauthenticatedError(e: any): boolean {\n  const status = e?.status;\n  const hasTerminalUserErrorCode =\n    Array.isArray(e?.errors) && e.errors.some((error: any) => unauthenticated403ErrorCodes.has(error?.code));\n\n  return status === 401 || status === 422 || (status === 403 && hasTerminalUserErrorCode);\n}\n\n/**\n * Checks if the provided error is a network error.\n *\n * @internal\n */\nexport function isNetworkError(e: any): boolean {\n  // TODO: revise during error handling epic\n  const message = (`${e.message}${e.name}` || '').toLowerCase().replace(/\\s+/g, '');\n  return message.includes('networkerror');\n}\n\n/**\n * Checks if the provided error is either a ClerkAPIResponseError, a ClerkRuntimeError, or a MetamaskError.\n */\nexport function isKnownError(error: any): error is ClerkAPIResponseError | ClerkRuntimeError | MetamaskError {\n  return isClerkAPIResponseError(error) || isMetamaskError(error) || isClerkRuntimeError(error);\n}\n\n/**\n * Checks if the provided error is a Clerk runtime error indicating a reverification was cancelled.\n */\nexport function isReverificationCancelledError(err: any) {\n  return isClerkRuntimeError(err) && err.code === 'reverification_cancelled';\n}\n\n/**\n * Checks if the provided error is a Metamask error.\n */\nexport function isMetamaskError(err: any): err is MetamaskError {\n  return 'code' in err && [4001, 32602, 32603].includes(err.code) && 'message' in err;\n}\n\n/**\n * Checks if the provided error is clerk api response error indicating a user is locked.\n */\nexport function isUserLockedError(err: any) {\n  return isClerkAPIResponseError(err) && err.errors?.[0]?.code === 'user_locked';\n}\n\n/**\n * Checks if the provided error is a clerk api response error indicating a password was pwned.\n *\n * @internal\n */\nexport function isPasswordPwnedError(err: any) {\n  return isClerkAPIResponseError(err) && err.errors?.[0]?.code === 'form_password_pwned';\n}\n\n/**\n * Checks if the provided error is a clerk api response error indicating a password was compromised.\n *\n * @internal\n */\nexport function isPasswordCompromisedError(err: any) {\n  return isClerkAPIResponseError(err) && err.errors?.[0]?.code === 'form_password_compromised';\n}\n\n/**\n * Checks if the provided error is an EmailLinkError.\n */\nexport function isEmailLinkError(err: Error): err is EmailLinkError {\n  return err.name === 'EmailLinkError';\n}\n","import { isClerkAPIResponseError } from './clerkApiResponseError';\nimport type { ClerkError } from './clerkError';\nimport { isClerkRuntimeError } from './clerkRuntimeError';\n\n/**\n * Creates a ClerkGlobalHookError object from a ClerkError instance.\n * It's a wrapper for all the different instances of Clerk errors that can\n * be returned when using Clerk hooks.\n */\nexport function createClerkGlobalHookError(error: ClerkError) {\n  const predicates = {\n    isClerkAPIResponseError,\n    isClerkRuntimeError,\n  } as const;\n\n  for (const [name, fn] of Object.entries(predicates)) {\n    Object.assign(error, { [name]: fn });\n  }\n\n  return error as ClerkError & typeof predicates;\n}\n\nexport type ClerkGlobalHookError = ReturnType<typeof createClerkGlobalHookError>;\n"],"mappings":";;;;;;AAQA,IAAa,gBAAb,MAAmG;CACjG,OAAO,OAAO;CACd,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CAET,YAAY,MAAyB;EACnC,MAAM,cAAc;GAClB,MAAM,KAAK;GACX,SAAS,KAAK;GACd,aAAa,KAAK;GAClB,MAAM;IACJ,WAAW,KAAK,MAAM;IACtB,WAAW,KAAK,MAAM;IACtB,gBAAgB,KAAK,MAAM;IAC3B,aAAa,KAAK,MAAM;IACxB,QAAQ,KAAK,MAAM;IACnB,MAAM,KAAK,MAAM;IACjB,uBAAuB,KAAK,MAAM;IAClC,oBAAoB,KAAK,MAAM;IAC/B,eAAe,KAAK,MAAM;GAC5B;EACF;EACA,KAAK,OAAO,YAAY;EACxB,KAAK,UAAU,YAAY;EAC3B,KAAK,cAAc,YAAY;EAC/B,KAAK,OAAO,YAAY;CAC1B;AACF;;;;AAKA,MAAa,kBAAkB,qBAAqB,aAAa;;;;;;;;;AClCjE,SAAgB,YAAY,OAA4B,CAAC,GAA6B;CACpF,OAAO,KAAK,SAAS,IAAI,KAAK,KAAI,MAAK,IAAI,cAAc,CAAC,CAAC,IAAI,CAAC;A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