{"record":{"id":"034a385edbf6433e","repo":"Significant-Gravitas/AutoGPT","slug":"failed-to-fetch-response-status","errorCode":null,"errorMessage":"Failed to fetch: ${response.status}","messagePattern":"Failed to fetch: (.+?)","errorType":"exception","errorClass":"ArtifactFetchError","httpStatus":null,"severity":"error","filePath":"autogpt_platform/frontend/src/app/(platform)/copilot/components/ArtifactPanel/components/useArtifactContent.ts","lineNumber":103,"sourceCode":"    }\n  } catch {\n    return prefix;\n  }\n\n  return prefix;\n}\n\nasync function fetchArtifactResponse(url: string): Promise<Response> {\n  for (let attempt = 0; attempt <= CONTENT_FETCH_MAX_RETRIES; attempt++) {\n    try {\n      const response = await fetch(url);\n      if (response.ok) return response;\n\n      if (\n        !isTransientArtifactFetchStatus(response.status) ||\n        attempt === CONTENT_FETCH_MAX_RETRIES\n      ) {\n        throw new ArtifactFetchError(await parseArtifactFetchError(response));\n      }\n    } catch (error) {\n      if (error instanceof ArtifactFetchError) throw error;\n      if (attempt === CONTENT_FETCH_MAX_RETRIES) {\n        throw error instanceof Error\n          ? error\n          : new Error(\"Failed to fetch artifact\");\n      }\n    }\n\n    await sleep(CONTENT_FETCH_RETRY_DELAY_MS);\n  }\n\n  throw new Error(\"Failed to fetch artifact\");\n}\n\nexport function getCachedArtifactContent(id: string): string | undefined {\n  return contentCache.get(id);","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/frontend/src/app/(platform)/copilot/components/ArtifactPanel/components/useArtifactContent.ts#L85-L121","documentation":"NotFoundError raised inside _validate_resource_ownership when a StoreListing transfer target doesn't exist: the storelisting row is missing or flagged isDeleted. Soft-deleted listings are intentionally treated as nonexistent so they cannot be transferred.","triggerScenarios":"Creating a transfer with resourceType='StoreListing' and a resource_id for a listing that was deleted (isDeleted=True) or never existed.","commonSituations":"Listing removed from the store between page load and transfer submission; stale listing list in the frontend; wrong-environment id.","solutions":["Fetch the listing and confirm it exists and is not deleted before creating the transfer.","Refresh the listing selector when the store data is older than the current session.","Handle 404 by re-querying the store listings."],"exampleFix":"# before\nawait create_transfer(\"StoreListing\", listing_id, ...)\n\n# after\nlisting = await get_store_listing(listing_id)\nif listing is None or listing.is_deleted:\n    raise LookupError(\"Listing unavailable\")\nawait create_transfer(\"StoreListing\", listing.id, ...)","handlingStrategy":"validation","validationCode":"listing = await get_store_listing(resource_id)\nif listing is None or listing.is_deleted:\n    refresh_listings()","typeGuard":null,"tryCatchPattern":"try:\n    await create_transfer(\"StoreListing\", lid, ...)\nexcept NotFoundError as e:\n    if \"StoreListing\" in str(e):\n        refresh_listings()","preventionTips":["Confirm the listing is live before offering transfer","Treat soft-deleted listings as unavailable in the UI"],"tags":["transfers","store-listing","not-found"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}