Significant-Gravitas/AutoGPT · error · DatabaseError

Failed to update store listing version

Error message

Failed to update store listing version

What it means

DatabaseError raised in edit_store_submission when the StoreListingVersion update() call returns None. Inside a transaction this typically reflects the same class of issues as error 410: the transaction aborted or the update could not be confirmed. It fires after ownership and version-existence checks passed, so it is an infrastructure/write-path failure rather than a client-input one.

Source

Thrown at autogpt_platform/backend/backend/api/features/store/db.py:1126

        # Update the existing version
        updated_version = await prisma.models.StoreListingVersion.prisma().update(
            where={"id": store_listing_version_id},
            data=prisma.types.StoreListingVersionUpdateInput(
                name=name,
                videoUrl=video_url,
                agentOutputDemoUrl=agent_output_demo_url,
                imageUrls=image_urls,
                description=description,
                categories=categories,
                subHeading=sub_heading,
                changesSummary=changes_summary,
                recommendedScheduleCron=recommended_schedule_cron,
                instructions=instructions,
            ),
            include={"StoreListing": True},
        )
        if not updated_version:
            raise DatabaseError("Failed to update store listing version")

        logger.debug(
            f"Updated existing listing version {store_listing_version_id} "
            f"for graph {current_version.agentGraphId}"
        )

        return store_model.StoreSubmission.from_listing_version(updated_version)

    except (
        store_exceptions.SubmissionNotFoundError,
        store_exceptions.UnauthorizedError,
        NotFoundError,
        store_exceptions.ListingExistsError,
        store_exceptions.InvalidOperationError,
    ):
        raise
    except prisma.errors.PrismaError as e:
        logger.error(f"Database error editing store submission: {e}")

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Check logs for the surrounding PrismaError to see why the update did not commit.
  2. Serialize edits in the UI (lock the form while saving; reload the version before editing).
  3. If a DB trigger/constraint is involved, inspect it in the migration history.
Defensive patterns

Strategy: try-catch

Validate before calling

const fresh = await api.getSubmission(store_listing_version_id);
if (fresh.submission_status !== form.baseline_status) {
  // someone changed it underneath us — reload the edit form
  reloadForm(fresh);
  return;
}
await api.editSubmission(store_listing_version_id, form);

Try / catch

from backend.util.exceptions import DatabaseError

try:
    await store_db.edit_store_submission(...)
except DatabaseError as e:
    if 'Failed to update store listing version' in str(e):
        fresh = await refetch_version(store_listing_version_id)
        if fresh: return await store_db.edit_store_submission(...)  # one rebased retry
        raise

Prevention

When it happens

Trigger: PUT/edit submission while another edit to the same listing version commits first and invalidates this transaction; DB connection lost mid-transaction; a trigger or constraint on StoreListingVersion aborting the update silently.

Common situations: Two editors (or two tabs) editing the same submission; auto-save racing an explicit save; long-running transactions timing out under load.

Related errors


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/4b6c96ac89883b8e. Report an issue: GitHub.