gitroomhq/postiz-app · error · BadBody
The file took too long to process, please try again
Error message
The file took too long to process, please try again
What it means
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.
Source
Thrown at libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts:501
async post(
id: string,
accessToken: string,
postDetails: PostDetails<PinterestSettingsDto>[],
integration: Integration
): Promise<PostResponse[]> {
const [response] = await this.postPending(id, accessToken, postDetails);
let pendingData = response.pendingData;
const started = Date.now();
// eslint-disable-next-line no-constant-condition
while (true) {
// Cap below the 10-minute activity timeout of the old workflows using
// this method: failing here is safe (the pin is only created once the
// media is ready), timing the activity out is not - a retried activity
// would upload and publish again.
if (Date.now() - started > 8 * 60 * 1000) {
throw new BadBody(
'pinterest',
JSON.stringify({}),
{} as any,
'The file took too long to process, please try again'
);
}
const check = await this.checkPostStatus(
accessToken,
pendingData,
integration
);
if (check.status === 'pending') {
pendingData = check.pendingData;
await timer(20000);
continue;
}View on GitHub (pinned to 0f1647f749)
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
Defensive patterns
Strategy: retry
Try / catch
if (/file took too long to process/.test(err.message)) { /* pin not created, safe retry */ } Prevention
- Compress images before scheduling to Pinterest
When it happens
Trigger: Pinterest media file stays in a non-ready state for more than 8*60*1000 ms while post() waits.
Common situations: Large images, Pinterest processing delays, or API throttling during polling.
Related errors
- LinkedIn took too long to process the media, please try agai
- The media took too long to process, please try again
- The file is corrupted and cannot be uploaded
- Threads took too long to process the media, please try again
- X took too long to process the media, please try again
AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27).
Data as JSON: /api/errors/f8468662052c4df2.
Report an issue: GitHub.