{"record":{"id":"097c58c49aa45bab","repo":"gitroomhq/postiz-app","slug":"integration-provider-not-found","errorCode":null,"errorMessage":"Integration provider not found","messagePattern":"Integration provider not found","errorType":"http","errorClass":"HttpException","httpStatus":404,"severity":"error","filePath":"apps/backend/src/public-api/routes/v1/public.integrations.controller.ts","lineNumber":576,"sourceCode":"    @Param('id') id: string,\n    @Body() body: { methodName: string; data: Record<string, string> }\n  ) {\n    Sentry.metrics.count('public_api-request', 1);\n    const getIntegration = await this._integrationService.getIntegrationById(\n      org.id,\n      id\n    );\n\n    if (!getIntegration) {\n      throw new HttpException({ msg: 'Integration not found' }, 404);\n    }\n\n    const integrationProvider = socialIntegrationList.find(\n      (p) => p.identifier === getIntegration.providerIdentifier\n    )!;\n\n    if (!integrationProvider) {\n      throw new HttpException({ msg: 'Integration provider not found' }, 404);\n    }\n\n    const tools = this._integrationManager.getAllTools();\n    if (\n      // @ts-ignore\n      !tools[integrationProvider.identifier]?.some(\n        (p: any) => p.methodName === body.methodName\n      ) ||\n      // @ts-ignore\n      !integrationProvider[body.methodName]\n    ) {\n      throw new HttpException({ msg: 'Tool not found' }, 404);\n    }\n\n    while (true) {\n      try {\n        // @ts-ignore\n        const result = await integrationProvider[body.methodName](","sourceCodeStart":558,"sourceCodeEnd":594,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts#L558-L594","documentation":"The integration row exists, but its providerIdentifier does not match any entry in socialIntegrationList — the registry of known channel providers. Because the lookup uses a non-null assertion (!) followed by a null check, the check actually works at runtime, but a mismatch means the backend build does not recognize the channel type stored in the database, yielding 404 'Integration provider not found'.","triggerScenarios":"POST to triggerIntegrationTool where the integration's providerIdentifier references a provider that has been renamed, removed, or is not registered in the running backend/orchestrator build. Also occurs if the DB row was written by a newer Postiz version with providers this build lacks.","commonSituations":"Running an older backend image against a database created by a newer version (new provider added); provider identifier renamed between versions; partially applied upgrade where the frontend/backend versions drift; custom provider removed from the build.","solutions":["Update the backend (and orchestrator) to a version whose provider registry includes the integration's providerIdentifier","Inspect the integration row's providerIdentifier and compare it against socialIntegrationList entries for a rename","If the provider was intentionally removed, delete the stale integration and reconnect the channel using a supported provider","Align all services (backend, orchestrator, frontend) on the same release so registries match"],"exampleFix":"// before\n// integration.providerIdentifier === 'threads-v2' but build only knows 'threads'\nawait triggerTool(integration.id, 'post', {...}); // 404 provider not found\n\n// after\n// upgrade backend so socialIntegrationList contains 'threads-v2', or reconnect the channel\n// so the integration row stores a providerIdentifier the build recognizes\nawait triggerTool(integration.id, 'post', {...});","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set(['twitter', 'linkedin', 'instagram', /* mirror your build's socialIntegrationList */]);\nif (!SUPPORTED.has(integration.providerIdentifier)) {\n  throw new Error(`Provider ${integration.providerIdentifier} unsupported by this backend build`);\n}","typeGuard":"const isKnownProvider = (id: string, registry: string[]): id is string =>\n  registry.includes(id);","tryCatchPattern":"try {\n  await triggerTool(id, method, args);\n} catch (e: any) {\n  if (e?.status === 404 && /provider/i.test(e?.response?.msg ?? '')) {\n    // backend build lacks this provider: upgrade or reconnect under a supported provider\n  } else throw e;\n}","preventionTips":["Pin backend/orchestrator/frontend to the same release version","After upgrades, verify every connected channel's providerIdentifier is still in the registry","Treat unknown-provider integrations as data needing migration, not transient errors"],"tags":["public-api","provider-registry","version-mismatch","http-404"],"backgroundTag":"provider-registry-mismatch","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}