Discord shows “This interaction failed” (or “The application did not respond”) when it gets no
valid answer in time. Composure answers handler errors itself, with an ephemeral message the
user reads and a log line with the cause, so Discord’s own failure usually means the answer
never arrived or Discord rejected it. Start with the logs: wrangler tail or Workers Logs on
Cloudflare, stderr on a server.
“The application did not respond”; the handler finishes later
Answer with ctx.defer(..) and do the slow part in Background Work (REST and deferring). On Workers, a cold start plus slow REST calls before answering can be enough
Signature or public key mismatch
401 in the logs; the Endpoint URL won’t save
Set DISCORD_PUBLIC_KEY to the public key of the application whose Endpoint URL points at the bot, not another one’s (development and production apps differ)
Configuration failed to load
500 on Workers, logged on the isolate’s first request
A missing secret or var, or an error from .with_credentials / .with_data; set it and retry
Discord rejected the response
The handler ran, nothing is logged as an error
A response Discord refuses: more than 10 embeds, an empty message, a component built by hand over its limits. Views are checked before answering (counts, lengths, repeated select option values) and fail as a handler error instead. Compare the response with Discord’s limits; Testing shows the JSON
Components V2 with content or embeds
An error naming the field
A Components V2 message (a Container, a View) carries its text in text displays: move content and embeds into components
A Command doesn’t show up. Sync it; global Commands can take a moment to appear in the
client, and a guild-only Command shows only where it was sent. Restarting Discord (Ctrl+R)
refreshes its cache.
An ephemeral deferral turned the answer ephemeral. Ephemerality is decided by the first
response: Ephemeral(ctx.defer(..)) makes the final message ephemeral too.
Webhook Events don’t arrive. The Webhook Events URL must end in /events, and each event
must be enabled in the Developer Portal.