{"record":{"id":"1a79480a28e49f70","repo":"linshenkx/prompt-optimizer","slug":"google-drive-object-not-found-path","errorCode":null,"errorMessage":"Google Drive object not found: ${path}","messagePattern":"Google Drive object not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/ui/src/utils/remote-backup.ts","lineNumber":856,"sourceCode":"  }\n\n  async put(\n    path: string,\n    body: Blob | ArrayBuffer | Uint8Array | string,\n    options?: { contentType?: string },\n  ): Promise<RemoteObjectEntry> {\n    const normalized = normalizeObjectPath(path)\n    const blob = bodyToBlob(body, options?.contentType || JSON_MIME_TYPE)\n    const existingId = await this.findObjectId(normalized)\n    if (existingId) {\n      return this.updateFile(existingId, normalized, blob)\n    }\n    return this.createFile(normalized, blob)\n  }\n\n  async get(path: string): Promise<ArrayBuffer> {\n    const id = await this.findObjectId(path)\n    if (!id) throw new Error(`Google Drive object not found: ${path}`)\n    const response = await this.fetchGoogleDrive(\n      `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(id)}?alt=media`,\n      {},\n      `Google Drive download failed: ${normalizeObjectPath(path)}`,\n      { downloadRetry: true },\n    )\n    return response.arrayBuffer()\n  }\n\n  async list(prefix: string): Promise<RemoteObjectEntry[]> {\n    const normalized = normalizeObjectPath(prefix)\n    const folderId = normalized ? await this.findOrCreateFolderPath(normalized) : await this.ensureRootFolderId()\n    const basePath = normalized\n    return this.listFolderRecursive(folderId, basePath)\n  }\n\n  async delete(path: string): Promise<void> {\n    const id = await this.findObjectId(path)","sourceCodeStart":838,"sourceCodeEnd":874,"githubUrl":"https://github.com/linshenkx/prompt-optimizer/blob/3e677b1d9f7e0493c142c175560531e7ae786dce/packages/ui/src/utils/remote-backup.ts#L838-L874","documentation":"Google Drive provider's get() resolves a path to a Drive object id via findObjectId; when no object matches the path it throws this not-found error. It indicates the backup file no longer exists at that path in the Drive account/folder.","triggerScenarios":"Calling store.get(path) for a backup path that was deleted in Google Drive, moved out of the backup folder, created under a different root folder, or when the OAuth user differs from the one who created the backup.","commonSituations":"User deleted the file in Drive manually; switching Google accounts; root folder cache pointing to another folder; restoring an old entry whose file was purged.","solutions":["Verify the file still exists in the Drive backup folder under the same account","Call list() and match entries by path before get()","Handle not-found as a stale manifest entry and offer re-upload/recreate"],"exampleFix":"// before\nconst buf = await store.get(entry.id)\n// after\nconst entries = await store.list('')\nif (!entries.some(e => e.path === entry.id)) throw new Error('stale entry')\nconst buf = await store.get(entry.id)","handlingStrategy":"validation","validationCode":"const entries = await store.list('')\nconst exists = entries.some(e => e.path === entry.id)","typeGuard":null,"tryCatchPattern":"try { await store.get(path) } catch (e) { if ((e as Error).message.includes('object not found')) return null; throw e }","preventionTips":["List before get","Detect stale manifest entries and clean them"],"tags":["google-drive","not-found","remote-backup"],"backgroundTag":"resource-not-found","analyzedSha":"3e677b1d9f7e0493c142c175560531e7ae786dce","analyzedAt":"2026-08-27T21:29:16.709Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}