Skip to content

docs(ai): spec for #37154 stop returning stack traces from AI viewtool exceptions - #37455

Open
hassandotcms wants to merge 1 commit into
mainfrom
37154-ai-viewtool-stack-trace
Open

docs(ai): spec for #37154 stop returning stack traces from AI viewtool exceptions#37455
hassandotcms wants to merge 1 commit into
mainfrom
37154-ai-viewtool-stack-trace

Conversation

@hassandotcms

Copy link
Copy Markdown
Contributor

Spec only (PR 1 of 2) for #37154. Part of epic #37255 (dotAI Security Hardening).

When a dotAI viewtool call fails, the returned result carries the full Java stack trace and the raw exception message. Any template that prints the result exposes class names, file names and line numbers to site visitors. There is no environment or debug gate.

Proposed fix: one shared exception handler for the $ai viewtool that returns a fixed, generic error message with no exception-derived text, and logs the full exception server-side via Logger. Covers the completions and search sub-tools and generateImage. generateText rethrows today; the plan verifies whether the rendering layer prints that exception and brings it under the handler only if it does.

Success-path behaviour is unchanged. No API, schema or data changes. Rollback-safe.

Please review specs/37154-ai-viewtool-stack-trace/spec.md. On approval, planning and implementation follow in PR 2.

This PR fixes: #37154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

dotAI: Stop returning Java stack traces from AI viewtool exceptions

1 participant