Beignet API reference
    Preparing search index...

    Function rootFormError

    • Map a failed endpoint call or mutation error to a root-level form error.

      Wraps contractErrorMessage from @beignet/core/client, so non-contract errors get the fallback copy and catalog codes can be overridden per form:

      form.setError(
      "root",
      rootFormError(error, "Could not update profile.", {
      HANDLE_UNAVAILABLE: "That handle is already taken.",
      }),
      );

      Parameters

      • error: unknown
      • fallback: string
      • Optionaloverrides: Partial<Record<string, string>>

      Returns RootFormError