{"record":{"id":"d92fe2b7559aba95","repo":"gitroomhq/postiz-app","slug":"pinterest-may-have-already-published-this-pin-ple","errorCode":null,"errorMessage":"Pinterest may have already published this pin, please check your account before posting again to avoid duplicates","messagePattern":"Pinterest may have already published this pin, please check your account before posting again to avoid duplicates","errorType":"exception","errorClass":"BadBody","httpStatus":null,"severity":"warning","filePath":"libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts","lineNumber":350,"sourceCode":"            board: postDetails?.[0]?.settings.board,\n          },\n          imagePaths: (postDetails?.[0]?.media || []).map((m) => m.path),\n          coverPath: picture?.path,\n        } as PinterestPendingData,\n      },\n    ];\n  }\n\n  override async checkPostStatus(\n    accessToken: string,\n    pendingData: PinterestPendingData,\n    integration: Integration\n  ): Promise<PendingCheckResponse> {\n    // A confirmed create attempt died without reporting its result: Pinterest\n    // gives no way to ask whether that pin was created, so never run the\n    // create again - stop with an explicit warning instead.\n    if (pendingData.attempting && pendingData.confirmed) {\n      throw new BadBody(\n        'pinterest',\n        JSON.stringify({}),\n        {} as any,\n        'Pinterest may have already published this pin, please check your account before posting again to avoid duplicates'\n      );\n    }\n\n    // witness the armed create so finalizePost knows the attempt is uniquely\n    // accounted for before it mutates anything\n    const witness = (): PendingCheckResponse =>\n      pendingData.attempting && !pendingData.confirmed\n        ? {\n            status: 'ready',\n            pendingData: { ...pendingData, confirmed: true },\n          }\n        : { status: 'ready', pendingData };\n\n    // Image-only pins have no asynchronous processing step.","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts#L332-L368","documentation":"PinterestProvider.checkPostStatus detects a pending pin whose creation attempt was confirmed started but whose result was never recorded (workflow died mid-create). Pinterest offers no query API for whether a pin was created, so re-running create would risk a duplicate pin; the provider refuses and warns the user to check their account.","triggerScenarios":"pendingData.attempting && pendingData.confirmed is true — the create call was sent to Pinterest but the workflow crashed/timed out before saving the result, and checkPostStatus runs afterward.","commonSituations":"Temporal activity timeout or worker crash between the Pinterest create request and persisting the outcome; retrying a workflow in this ambiguous state.","solutions":["Manually check the Pinterest account/board for the pin","If not published, delete the pending state and re-post","If published, mark the post as done manually to avoid a duplicate","Avoid retrying the same pending workflow repeatedly"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (e) { if (/may have already published this pin/.test(e.message)) { /* pause, require manual verification */ } }","preventionTips":["Never auto-retry a pending Pinterest pin with confirmed=true","Persist create outcomes as soon as the request is sent"],"tags":["pinterest","ambiguous-outcome","duplicate-prevention"],"backgroundTag":"ambiguous-create-outcome","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}