{"record":{"id":"936f714b17fef10a","repo":"paperclipai/paperclip","slug":"permission-denied","errorCode":"PERMISSION_DENIED","errorMessage":"PERMISSION_DENIED","messagePattern":"PERMISSION_DENIED","errorType":"error_code","errorClass":"PermissionError","httpStatus":403,"severity":"error","filePath":"server/src/services/chat-telegram-ephemeral.ts","lineNumber":335,"sourceCode":"          ? Math.min(body.parameters.retry_after, 3600)\n          : 1;\n      throw Object.assign(new Error(\"Telegram private response rate limited\"), {\n        name: \"RateLimitError\",\n        adapter: \"telegram\",\n        status: 429,\n        retryAfter,\n      });\n    }\n    if (status === 401)\n      throw Object.assign(new Error(\"Telegram authentication rejected\"), {\n        name: \"AuthenticationError\",\n        adapter: \"telegram\",\n        status: 401,\n      });\n    if (status === 403)\n      throw Object.assign(new Error(\"Telegram destination rejected\"), {\n        name: \"PermissionError\",\n        code: \"PERMISSION_DENIED\",\n        adapter: \"telegram\",\n        status: 403,\n      });\n    if (status >= 400 && status < 500) throw reject();\n    throw unknown();\n  }\n  const result = body.result;\n  if (\n    !record(result) ||\n    !record(result.chat) ||\n    String(result.chat.id) !== receipt.chatId ||\n    (result.message_thread_id ?? null) !== receipt.messageThreadId ||\n    !record(result.from) ||\n    String(result.from.id) !== receipt.botUserId ||\n    result.from.is_bot !== true\n  )\n    throw unknown();\n  if (receipt.chatType === \"private\") {","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/chat-telegram-ephemeral.ts#L317-L353","documentation":"Thrown by sendTelegramCallbackNotice in chat-telegram-ephemeral.ts when the Telegram Bot API answers HTTP 403 to a private-response callback send. It means Telegram's destination refused the delivery — typically the chat became inaccessible, the bot was blocked, or the target user/chat is no longer reachable — so the ephemeral response cannot be delivered. It is raised as a PermissionError with adapter=telegram and status=403.","triggerScenarios":"Thrown at server/src/services/chat-telegram-ephemeral.ts:335 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Catch PermissionError for adapter telegram/status 403 and mark the ephemeral response as permanently undeliverable instead of retrying","Check bot chat permissions (bot blocked, kicked from chat) via getChat/getChatMember to confirm the cause before giving up","Surface the delivery failure in the activity/run log so the operator knows the Telegram side never saw the response"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}