{"record":{"id":"f8468662052c4df2","repo":"gitroomhq/postiz-app","slug":"the-file-took-too-long-to-process-please-try-agai","errorCode":null,"errorMessage":"The file took too long to process, please try again","messagePattern":"The file took too long to process, please try again","errorType":"exception","errorClass":"BadBody","httpStatus":null,"severity":"error","filePath":"libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts","lineNumber":501,"sourceCode":"  async post(\n    id: string,\n    accessToken: string,\n    postDetails: PostDetails<PinterestSettingsDto>[],\n    integration: Integration\n  ): Promise<PostResponse[]> {\n    const [response] = await this.postPending(id, accessToken, postDetails);\n\n    let pendingData = response.pendingData;\n    const started = Date.now();\n\n    // eslint-disable-next-line no-constant-condition\n    while (true) {\n      // Cap below the 10-minute activity timeout of the old workflows using\n      // this method: failing here is safe (the pin is only created once the\n      // media is ready), timing the activity out is not - a retried activity\n      // would upload and publish again.\n      if (Date.now() - started > 8 * 60 * 1000) {\n        throw new BadBody(\n          'pinterest',\n          JSON.stringify({}),\n          {} as any,\n          'The file took too long to process, please try again'\n        );\n      }\n\n      const check = await this.checkPostStatus(\n        accessToken,\n        pendingData,\n        integration\n      );\n\n      if (check.status === 'pending') {\n        pendingData = check.pendingData;\n        await timer(20000);\n        continue;\n      }","sourceCodeStart":483,"sourceCodeEnd":519,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts#L483-L519","documentation":"PinterestProvider.post polls the uploaded media file until ready before creating the pin, capped at 8 minutes — deliberately below the 10-minute Temporal activity timeout. The pin is only created once media is ready, so failing here is retry-safe (no duplicate pin), unlike an activity timeout which would re-run create.","triggerScenarios":"Pinterest media file stays in a non-ready state for more than 8*60*1000 ms while post() waits.","commonSituations":"Large images, Pinterest processing delays, or API throttling during polling.","solutions":["Retry the post — the pin was not created, so no duplicate risk","Downsize/compress the image before scheduling","Check Pinterest API health if slowness persists"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if (/file took too long to process/.test(err.message)) { /* pin not created, safe retry */ }","preventionTips":["Compress images before scheduling to Pinterest"],"tags":["pinterest","timeout","media-processing"],"backgroundTag":"media-processing-timeout","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}