{"version":3,"file":"error-NXMTfCAv.mjs","names":["packageName","customMessages"],"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      } 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    },\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\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 *\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  return status === 401 || status === 422;\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 *\n * @internal\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 *\n * @internal\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 *\n * @internal\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 *\n * @internal\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 *\n * @internal\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;IACnC;GACF;AACD,OAAK,OAAO,YAAY;AACxB,OAAK,UAAU,YAAY;AAC3B,OAAK,cAAc,YAAY;AAC/B,OAAK,OAAO,YAAY;;;;;;AAO5B,MAAa,kBAAkB,qBAAqB,cAAc;;;;;;;;;AChClE,SAAgB,YAAY,OAA4B,EAAE,EAA4B;AACpF,QAAO,KAAK,SAAS,IAAI,KAAK,KAAI,MAAK,IAAI,cAAc,EAAE,CAAC,GAAG,EAAE;;;;;;;;;AAUnE,SAAgB,WAAW,OAAkD;AAC3E,QAAO,IAAI,cAAc,MAAM;;;;;;;AAQjC,SAAgB,YAAY,OAAgD;AAC1E,QAAO;EACL,MAAM,OAAO,QAAQ;EACrB,SAAS,OAAO,WAAW;EAC3B,cAAc,OAAO;EACrB,MAAM;GACJ,YAAY,OAAO,MAAM;GACzB,YAAY,OAAO,MAAM;GACzB,iBAAiB,OAAO,MAAM;GAC9B,aAAa,OAAO,MAAM;GAC1B,QAAQ,OAAO,MAAM;GACrB,MAA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