{"record":{"id":"9d1ffc3170c6aeb5","repo":"vercel/ai","slug":"google-files-upload-timeout","errorCode":"GOOGLE_FILES_UPLOAD_TIMEOUT","errorMessage":"File processing timed out after ${pollTimeoutMs}ms","messagePattern":"File processing timed out after (.+?)ms","errorType":"error_code","errorClass":"AISDKError","httpStatus":null,"severity":"error","filePath":"packages/google/src/google-files.ts","lineNumber":143,"sourceCode":"      throw new AISDKError({\n        name: 'GOOGLE_FILES_UPLOAD_ERROR',\n        message: `Failed to upload file data: ${uploadResponse.status} ${errorBody}`,\n      });\n    }\n\n    const uploadResult = (await uploadResponse.json()) as {\n      file: GoogleFileResource;\n    };\n\n    let file = uploadResult.file;\n\n    const pollIntervalMs = googleOptions?.pollIntervalMs ?? 2000;\n    const pollTimeoutMs = googleOptions?.pollTimeoutMs ?? 300000;\n    const startTime = Date.now();\n\n    while (file.state === 'PROCESSING') {\n      if (Date.now() - startTime > pollTimeoutMs) {\n        throw new AISDKError({\n          name: 'GOOGLE_FILES_UPLOAD_TIMEOUT',\n          message: `File processing timed out after ${pollTimeoutMs}ms`,\n        });\n      }\n\n      await delay(pollIntervalMs);\n\n      const fileNameMatch = /^files\\/([^/]+)$/.exec(file.name);\n      const filePath =\n        fileNameMatch != null\n          ? `files/${encodePathSegment(fileNameMatch[1])}`\n          : encodePathSegment(file.name);\n\n      const { value: fileStatus } = await getFromApi({\n        url: `${this.config.baseURL}/${filePath}`,\n        validateUrl: false,\n        headers: combineHeaders(resolvedHeaders),\n        successfulResponseHandler: createJsonResponseHandler(","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/google/src/google-files.ts#L125-L161","documentation":"Error \"File processing timed out after ${pollTimeoutMs}ms\" thrown in vercel/ai.","triggerScenarios":"Thrown at packages/google/src/google-files.ts:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}