Significant-Gravitas/AutoGPT · error · DatabaseError
Failed to create store submission review
Error message
Failed to create store submission review
What it means
Catch-all DatabaseError at the bottom of review_store_submission(). Any exception other than the re-raised NotFoundError — the update transaction, sub-agent approval (_approve_sub_agent), notification model construction, or serialization into StoreSubmissionAdminView — is logged as 'Could not create store submission review' and re-wrapped here.
Source
Thrown at autogpt_platform/backend/backend/api/features/store/db.py:1588
await _send_submission_review_notification(
creator_user_id,
is_approved,
external_comments,
reviewed_submission,
)
except Exception as e:
logger.error(f"Failed to send email notification for agent review: {e}")
# Don't fail the review process if email sending fails
return store_model.StoreSubmissionAdminView.from_listing_version(
reviewed_submission
)
except NotFoundError:
raise
except Exception as e:
logger.error(f"Could not create store submission review: {e}")
raise DatabaseError("Failed to create store submission review") from e
async def _approve_sub_agent(
tx,
sub_graph: prisma.models.AgentGraph,
main_agent_name: str,
main_agent_graph_version: int,
main_agent_user_id: str,
) -> None:
"""Approve a single sub-agent by creating/updating store listings as needed"""
heading = f"Sub-agent of {main_agent_name} v{main_agent_graph_version}"
# Find existing listing for this sub-agent
listing = await prisma.models.StoreListing.prisma(tx).find_first(
where={"agentGraphId": sub_graph.id, "isDeleted": False},
include={"Versions": True},
)
View on GitHub (pinned to 9c8bb5550f)
Solutions
- Check the server log for 'Could not create store submission review: {e}' — the chained cause names the failing step.
- If the cause is in _approve_sub_agent, inspect the sub-agent AgentGraph records for the reviewed submission.
- Re-run `poetry run prisma generate` if the cause is a missing/relation field after schema changes.
- Verify the DB state was not half-updated (the update and sub-agent steps are not one transaction) and reconcile if needed.
Defensive patterns
Strategy: try-catch
Try / catch
try:
view = await store_db.review_store_submission(...)
except DatabaseError as e:
logger.exception("Review failed")
raise HTTPException(503, "Review could not be recorded; state may be partial") from e Prevention
- Never assume the review is atomic — the update and sub-agent approval steps are separate; verify final submission state after errors.
- Keep integration tests covering approve-with-sub-agents to catch _approve_sub_agent regressions early.
When it happens
Trigger: Admin approve/reject where approving triggers sub-agent store-listing creation, listing updates, or StoreSubmissionAdminView.from_listing_version() and any of those steps throws (missing relation in the include, constraint violation, Prisma error).
Common situations: Approving an agent whose sub-agents reference deleted graphs, schema drift where included relations changed shape, or partial update data violating a NOT NULL/unique constraint.
Related errors
- Failed to fetch store agents
- Failed to fetch agent details
- Failed to fetch agent
- StoreListing {listing.id} has no CreatorProfile — FK violate
- Failed to fetch store creators
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/4f5685d103386adc.
Report an issue: GitHub.