{"record":{"id":"fd0b512bb6ceb73b","repo":"gitroomhq/postiz-app","slug":"finalizepost-is-not-implemented-for-this-provider","errorCode":null,"errorMessage":"'finalizePost is not implemented for this provider'","messagePattern":"'finalizePost is not implemented for this provider'","errorType":"exception","errorClass":"BadBody","httpStatus":null,"severity":"error","filePath":"libraries/nestjs-libraries/src/integrations/social.abstract.ts","lineNumber":200,"sourceCode":"    accessToken: string,\n    pendingData: any,\n    integration: Integration\n  ): Promise<PendingCheckResponse> {\n    throw new BadBody(\n      this.identifier,\n      '{}',\n      '{}',\n      'checkPostStatus is not implemented for this provider'\n    );\n  }\n\n  /** Runs the mutations left after `checkPostStatus` returns `ready`. Same contract as `checkPostStatus`. */\n  public async finalizePost(\n    accessToken: string,\n    pendingData: any,\n    integration: Integration\n  ): Promise<PendingCheckResponse> {\n    throw new BadBody(\n      this.identifier,\n      '{}',\n      '{}',\n      'finalizePost is not implemented for this provider'\n    );\n  }\n\n  // axios flavor of the SSRF-safe dispatcher that `this.fetch` applies - for\n  // providers that need axios (form-data / stream uploads). Never call plain\n  // axios with a user-influenced URL.\n  protected getSsrfSafeAxios() {\n    return getSsrfSafeAxios();\n  }\n\n  protected assetBoolean(value: boolean | string) {\n    if (typeof value === 'string') {\n      return value.toLowerCase() === 'true';\n    }","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/integrations/social.abstract.ts#L182-L218","documentation":"Companion stub to checkPostStatus on SocialAbstract: finalizePost performs the mutations remaining after a pending publish is reported ready. Providers that don't need a finalize step and don't override it get this BadBody error.","triggerScenarios":"The publish workflow calling finalizePost after checkPostStatus returned ready, on a provider class that did not override finalizePost.","commonSituations":"See trigger scenarios.","solutions":["Override finalizePost in the provider's integration class and return a PendingCheckResponse (e.g. { state: 'success', data: pendingData })","If finalize is a no-op for the provider, implement it to pass through the pendingData unchanged","Ensure the provider's checkPostStatus never returns 'ready' if finalization is unsupported"],"exampleFix":"// before\nclass FooProvider extends SocialAbstract {\n  // no finalizePost\n}\n// after\nclass FooProvider extends SocialAbstract {\n  public async finalizePost(accessToken: string, pendingData: any, integration: Integration): Promise<PendingCheckResponse> {\n    // provider-specific final mutations here\n    return { state: 'success', data: pendingData };\n  }\n}","handlingStrategy":"type-guard","validationCode":"if (provider.finalizePost === SocialAbstract.prototype.finalizePost) {\n  // no finalize step needed; don't call it\n}","typeGuard":"const supportsFinalize = (p: SocialAbstract): boolean =>\n  p.finalizePost !== SocialAbstract.prototype.finalizePost;","tryCatchPattern":"try {\n  await provider.finalizePost(token, pendingData, integration);\n} catch (e) {\n  if (/finalizePost is not implemented/.test(String(e?.message ?? e))) {\n    // finalize is a no-op for this provider; continue\n  } else throw e;\n}","preventionTips":["Always pair a checkPostStatus override with a finalizePost override","Default implementations can simply pass pendingData through"],"tags":["integrations","provider","not-implemented","finalization","abstract-method"],"backgroundTag":"unimplemented-abstract-method","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}