Significant-Gravitas/AutoGPT · warning · NotFoundError
User does not have a profile yet
Error message
User does not have a profile yet
What it means
NotFoundError (HTTP 404) from GET /store/profile when store_db.get_user_profile(user_id) returns None: the authenticated user exists in auth (Supabase JWT valid) but has no row in the store Profile table yet. It is an expected 'empty state', not a malfunction.
Source
Thrown at autogpt_platform/backend/backend/api/features/store/routes.py:49
##############################################
############### Profile Endpoints ############
##############################################
@router.get(
"/profile",
summary="Get user profile",
tags=["store", "private"],
dependencies=[Security(autogpt_libs.auth.requires_user)],
)
async def get_profile(
user_id: str = Security(autogpt_libs.auth.get_user_id),
) -> store_model.ProfileDetails:
"""Get the profile details for the authenticated user."""
profile = await store_db.get_user_profile(user_id)
if profile is None:
raise NotFoundError("User does not have a profile yet")
return profile
@router.post(
"/profile",
summary="Update user profile",
tags=["store", "private"],
dependencies=[Security(autogpt_libs.auth.requires_user)],
)
async def update_or_create_profile(
profile: store_model.Profile,
user_id: str = Security(autogpt_libs.auth.get_user_id),
) -> store_model.ProfileDetails:
"""Update the store profile for the authenticated user."""
updated_profile = await store_db.update_profile(user_id=user_id, profile=profile)
return updated_profile
View on GitHub (pinned to 9c8bb5550f)
Solutions
- Treat 404 as 'no profile yet': create one via POST /store/profile with a Profile payload.
- In the UI, render an empty-profile state instead of an error on 404.
- If the user should have a profile, verify the correct user_id is being sent (wrong Supabase user / spoofed ID mismatch).
Example fix
// before
const profile = await api.getStoreProfile(); // 404 crashes flow
// after
let profile: ProfileDetails | null = null;
try {
profile = await api.getStoreProfile();
} catch (e) {
if (e.status !== 404) throw e;
profile = null; // empty state -> offer POST /store/profile
} Defensive patterns
Strategy: fallback
Validate before calling
profile = await store_db.get_user_profile(user_id) has_profile = profile is not None
Try / catch
try:
profile = await store_db.get_user_profile(user_id)
except NotFoundError:
profile = None # empty state
if profile is None:
profile = await create_default_profile(user_id) # POST /store/profile Prevention
- Create the profile eagerly on first authenticated session if the UX expects one.
- Treat 404 on GET /store/profile as a normal empty state in clients.
When it happens
Trigger: First authenticated call to /store/profile by a brand-new user before any profile-creating action; a user whose profile row was deleted; or an environment where profile creation is lazy and the UI visits the profile page first.
Common situations: Fresh signup landing on the store/profile page; API consumers probing profile before the user completed onboarding.
Related errors
- Agent {username}/{agent_name} not found
- Store listing version {store_listing_version_id} not found
- Agent #{graph_id} v{graph_version} not found for this user (
- User must create a Marketplace Profile before submitting an
- Failed to get user profile
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/c10374431366a0b8.
Report an issue: GitHub.