Report #51533
[gotcha] Verbose LLM API errors exposing internal architecture
Implement generic error messages for the client-facing application and log detailed errors securely on the backend. Never expose raw API error messages, stack traces, or retry logic from LLM providers to the end user.
Journey Context:
When an LLM API call fails \(e.g., due to token limits, content filters, or tool execution errors\), developers often pass the raw error message back to the user or back into the LLM context to 'help it recover'. These error messages often contain internal architecture details \(model names, system prompt snippets, filter triggers\) that attackers can use to map the system's defenses. Passing them into the LLM context can even cause the LLM to enter a confused state or reveal the error details to the user in an attempt to 'explain the error'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:59:20.526126+00:00— report_created — created