{"record":{"id":"a1435b5feef490bc","repo":"paperclipai/paperclip","slug":"file-publication-receipt-lookup-was-called-for-a-n","errorCode":null,"errorMessage":"file publication receipt lookup was called for a non-Slack endpoint","messagePattern":"file publication receipt lookup was called for a non-Slack endpoint","errorType":"exception","errorClass":"SlackAdapterCompatibilityError","httpStatus":null,"severity":"error","filePath":"server/src/services/chat-sdk-runtime.ts","lineNumber":2513,"sourceCode":"      typeof slack.paperclipResolveFileUploadReceipt !== \"function\"\n    ) {\n      throw new SlackAdapterCompatibilityError(\n        \"file publication receipt capture is unavailable\",\n      );\n    }\n    return await slack.paperclipFileUploadReceiptContext.run(\n      onUploadAccepted,\n      async () => await this.chat.thread(threadId).post(message),\n    );\n  }\n\n  /** Resolve a previously accepted Slack upload using metadata reads only. */\n  async resolveSlackFileUploadReceipt(\n    threadId: string,\n    fileIds: string[],\n  ): Promise<string | null> {\n    if (this.provider !== \"slack\") {\n      throw new SlackAdapterCompatibilityError(\n        \"file publication receipt lookup was called for a non-Slack endpoint\",\n      );\n    }\n    const slack = this.adapter as unknown as SlackAdapterInternals;\n    if (typeof slack.paperclipResolveFileUploadReceipt !== \"function\") {\n      throw new SlackAdapterCompatibilityError(\n        \"file publication receipt lookup is unavailable\",\n      );\n    }\n    return await slack.paperclipResolveFileUploadReceipt.call(\n      this.adapter,\n      fileIds,\n      threadId,\n    );\n  }\n\n  /**\n   * Persist a Teams activity's authenticated reply route only after the","sourceCodeStart":2495,"sourceCodeEnd":2531,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/chat-sdk-runtime.ts#L2495-L2531","documentation":"resolveSlackFileUploadReceipt looks up previously accepted Slack upload IDs via the adapter's internal paperclipResolveFileUploadReceipt hook. Because that hook exists only on the Slack adapter, the runtime rejects the call with a SlackAdapterCompatibilityError when the endpoint provider is anything other than 'slack'.","triggerScenarios":"Calling resolveSlackFileUploadReceipt(threadId, fileIds) on a runtime whose provider is not 'slack' — e.g. resolving receipts recorded from a Slack flow but issued against a different endpoint's runtime instance.","commonSituations":"Receipt lookup code running on the wrong endpoint runtime after a provider reconfiguration; shared reconciliation jobs that iterate all endpoints and call the Slack-only resolver unconditionally; mixed-provider workspaces where a stale thread id belongs to another provider.","solutions":["Check the runtime provider is 'slack' before calling resolveSlackFileUploadReceipt; skip or route other providers.","Ensure the receipt lookup runs against the same Slack endpoint runtime that captured the receipt.","For provider-agnostic lookup, branch on provider and use each provider's own reconciliation path."],"exampleFix":"// before\nconst path = await runtime.resolveSlackFileUploadReceipt(threadId, fileIds);\n\n// after\nif (runtime.provider !== \"slack\") return null;\nconst path = await runtime.resolveSlackFileUploadReceipt(threadId, fileIds);","handlingStrategy":"validation","validationCode":"if (runtime.provider !== \"slack\") return null; // receipts only exist for Slack endpoints","typeGuard":"function isSlackRuntime(r: { provider: string }): boolean { return r.provider === \"slack\"; }","tryCatchPattern":"try {\n  return await runtime.resolveSlackFileUploadReceipt(threadId, fileIds);\n} catch (err) {\n  if (err instanceof SlackAdapterCompatibilityError) return null; // treat as unresolvable\n  throw err;\n}","preventionTips":["Run receipt reconciliation only against the endpoint that captured the receipt.","Filter reconciliation jobs by provider === 'slack' before invoking the resolver.","Store the endpoint/provider id alongside receipt metadata to prevent cross-runtime lookups."],"tags":["slack","adapter-compatibility","file-upload","provider-guard"],"backgroundTag":"unsupported-operation","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}