paperclipai/paperclip · error
Failed to load profile (${res.status})
Error message
Failed to load profile (${res.status}) What it means
UI profile fetch failure: /api/auth/profile returned a non-OK status and the response body carried no error text, so a generic message with the HTTP status is thrown. Unlike get-session there is no null fallback — the caller must handle the error (e.g. show a retry) since the session exists but profile loading failed.
Source
Thrown at ui/src/api/auth.ts:180
return nested;
},
signInEmail: async (input: { email: string; password: string }) => {
await authPost("/sign-in/email", input);
},
signUpEmail: async (input: { name: string; email: string; password: string }) => {
await authPost("/sign-up/email", input);
},
getProfile: async (): Promise<CurrentUserProfile> => {
const res = await fetch("/api/auth/profile", {
credentials: "include",
headers: { Accept: "application/json" },
});
const payload = await res.json().catch(() => null);
if (!res.ok) {
throw new Error((payload as { error?: string } | null)?.error ?? `Failed to load profile (${res.status})`);
}
return currentUserProfileSchema.parse(payload);
},
updateProfile: async (input: UpdateCurrentUserProfile): Promise<CurrentUserProfile> =>
authPatch("/profile", input, (payload) => currentUserProfileSchema.parse(payload)),
signOut: async (): Promise<SignOutResult | null> => {
const payload = await authPost("/sign-out", {});
if (!payload || typeof payload !== "object") return null;
const result = payload as Record<string, unknown>;
return {
...(typeof result.success === "boolean" ? { success: result.success } : {}),
...(typeof result.redirectTo === "string" ? { redirectTo: result.redirectTo } : {}),
};
},
};View on GitHub (pinned to 120ae5428f)
Solutions
- Sign in again and retry loading the profile.
- Verify the profile endpoint is reachable and the session is valid.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at ui/src/api/auth.ts:180 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/1a9390d62884c595.
Report an issue: GitHub.