paperclipai/paperclip · error
Teams file-card send result is unknown
Error message
Teams file-card send result is unknown
What it means
When sending a Teams file card via teams.app.send, the code wraps the POST in try/catch and, on any provider error, replaces the original error with this generic one. The original provider error is intentionally swallowed because it may contain private card context; an uncertain POST is treated as caller-owned durable evidence with no implicit retry.
Source
Thrown at server/src/services/chat-sdk-runtime.ts:1264
"Teams file cards require an exact personal conversation",
);
}
return await withThreadServiceUrl(
threadId,
async () => {
let result: unknown;
try {
// Direct App attachment send is deliberately inside the same route
// ALS as ordinary thread operations. Thread.post would turn these
// provider-native cards into AdaptiveCards.
result = await teams.app!.send!(decoded.conversationId as string, {
type: "message",
attachments: [card],
});
} catch {
// Provider errors may contain private card contexts. No implicit
// retry: an uncertain POST remains caller-owned durable evidence.
throw new Error("Teams file-card send result is unknown");
}
if (
!isRecord(result) ||
typeof result.id !== "string" ||
!result.id ||
result.id.length > 1024 ||
/[\x00-\x20\x7f]/.test(result.id)
) {
throw new Error("Teams file-card send receipt is unproven");
}
return { id: result.id };
},
true,
);
};
}
teams.paperclipRecordThreadServiceUrl = async (View on GitHub (pinned to 01ad858492)
Solutions
- Inspect server logs for the original provider error around this call site (the code suppresses it deliberately).
- Verify the recorded serviceUrl for the conversation is still valid; re-record it via teams.paperclipRecordThreadServiceUrl.
- Check the card payload (parseTeamsFileConsentCard / parseTeamsUploadedFileCard output) against Bot Framework file-card schema.
- Retry the send manually once connectivity/provider health is confirmed — the runtime will not retry implicitly by design.
Example fix
// before
await teams.paperclipSendFileCard(threadId, "consent", cardInput); // throws generic 'unknown'
// after
try {
await teams.paperclipSendFileCard(threadId, "consent", cardInput);
} catch (err) {
logger.warn({ threadId, err }, "teams file-card send uncertain; check provider logs");
throw err;
} Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
null
Try / catch
try {
await teams.paperclipSendFileCard(threadId, kind, input);
} catch (err) {
// Send result unknown: do NOT auto-retry (risk of duplicate cards).
logger.error({ threadId, kind }, "teams file-card send uncertain; verify delivery before retry");
throw err;
} Prevention
- Keep the recorded Teams serviceUrl fresh (re-record after adapter restarts).
- Validate card payloads with the parser functions before sending.
- Monitor Teams connector health; back off during provider incidents.
- Never blind-retry this send: an uncertain POST may have delivered the card.
When it happens
Trigger: teams.app.send(conversationId, {type:'message', attachments:[card]}) rejects: network failure, expired/invalid serviceUrl, Teams API rejecting the card payload, rate limiting, or any thrown exception inside the send call.
Common situations: Stale conversation serviceUrl after routing change; Teams tenant blocking the bot; malformed file-consent card payload rejected by the Bot Framework; transient 5xx/timeout from the Teams connector.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- Teams destination is missing its verified service URL
- Teams destination contains an invalid service URL
- Teams destination contains an untrusted service URL
- decodeThreadId is unavailable
- openDM is unavailable
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10).
Data as JSON: /api/errors/e11dd59af31761c8.
Report an issue: GitHub.