diegosouzapw/OmniRoute · error

Failed to import credentials

Error message

Failed to import credentials

What it means

Error "Failed to import credentials" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/shared/components/oauthBlobSubmit.ts:38

 * advances the modal to the success step and fires onSuccess; on failure it
 * THROWS so the caller's existing try/catch surfaces the error (keeps the modal
 * call site to two lines). Decoding + finalize + persist happen server-side.
 */
export async function submitCredentialBlob(
  provider: string,
  blob: string,
  reauthConnection: { id?: string } | null | undefined,
  setStep: (s: string) => void,
  onSuccess?: () => void
): Promise<void> {
  const res = await fetch(`/api/oauth/${provider}/paste-credentials`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ blob: blob.trim(), connectionId: reauthConnection?.id }),
  });
  const data = (await parseResponseBody(res)) as Record<string, unknown>;
  if (!res.ok) {
    throw new Error(getErrorMessage(data, res.status, "Failed to import credentials"));
  }
  setStep("success");
  onSuccess?.();
}

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/shared/components/oauthBlobSubmit.ts:38 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/3cd7729f639ab673. Report an issue: GitHub.