Function createErrorResponse
- createErrorResponse(
type: "fetch_error" | "no_tokens" | "refresh_error",
error: unknown,
): {
body: {
error: "fetch_error" | "no_tokens" | "refresh_error";
message: string;
};
headers: { "content-type": string };
ok: boolean;
redirected: boolean;
type: string;
status: number;
statusText: string;
} Parameters
- type: "fetch_error" | "no_tokens" | "refresh_error"
- error: unknown
Returns {
body: {
error: "fetch_error" | "no_tokens" | "refresh_error";
message: string;
};
headers: { "content-type": string };
ok: boolean;
redirected: boolean;
type: string;
status: number;
statusText: string;
}
body: { error: "fetch_error" | "no_tokens" | "refresh_error"; message: string }
headers: { "content-type": string }
ok: boolean
redirected: boolean
type: string
status: number
statusText: string