Repository navigation
Return extendedInfo as a string so the error report can show it (COLDBOX-1462) - #722
Merged
Merged
Conversation
BoxLang modules such as bx-orm put a struct of context in an exception's extendedInfo. BugReport.cfm (also used by Whoops for AJAX requests) passes getExtendedInfo() to encodeForHTML(), which fails on a struct, so the error page crashed and hid the real error. getExtendedInfo() now returns simple values as they are and complex values as JSON. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnmFsqBfa9SR4V1rRXw57X
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnmFsqBfa9SR4V1rRXw57X
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnmFsqBfa9SR4V1rRXw57X
Member
Author
|
The earlier format check failure was this PR's; it is fixed in dbd4466. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ExceptionBean.getExtendedInfo()now always returns a string. A simple value comes back as is; a struct, array or object comes back as JSON (with a safe fallback message if it cannot be serialized).Why: BoxLang modules such as bx-orm put a struct of context in
extendedInfo(for example{ entityName, property, operation }).BugReport.cfm(used for AJAX requests in development, and as the Whoops fallback) callsencodeForHTML( oException.getExtendedInfo() ), which throws on a struct. The error page then crashes and the real error is hidden.Reproduced with ContentBox on BoxLang + bx-orm 2 (AJAX request,
X-Requested-With: XMLHttpRequest):encodeForHTMLcast error, the original error is lost.cbSubscriber has no property [email]and Extended Info{"entityName":"cbSubscriber","property":"email","operation":"entityCriteria"}.Tests: added
testComplexExtendedInfoIsAStringintests/specs/web/context/ExceptionBeanTest.cfc(struct, array, missing value, andencodeForHTMLon the result). All 20 ExceptionBean specs pass on BoxLang.Jira Issues
https://ortussolutions.atlassian.net/browse/COLDBOX-1462
Type of change
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01SnmFsqBfa9SR4V1rRXw57X
Generated by Claude Code