Skip to content

Return extendedInfo as a string so the error report can show it (COLDBOX-1462) - #722

Merged
lmajano merged 3 commits into
developmentfrom
claude/exception-extendedinfo-string
Oct 16, 2026
Merged

lmajano merged 3 commits into
developmentfrom
claude/exception-extendedinfo-string

Conversation

@lmajano

@lmajano lmajano commented Oct 16, 2026

Copy link
Copy Markdown
Member

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) calls encodeForHTML( 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):

  • Before (8.3.0): the page shows an encodeForHTML cast error, the original error is lost.
  • After: the page shows the real error cbSubscriber has no property [email] and Extended Info {"entityName":"cbSubscriber","property":"email","operation":"entityCriteria"}.

Tests: added testComplexExtendedInfoIsAString in tests/specs/web/context/ExceptionBeanTest.cfc (struct, array, missing value, and encodeForHTML on the result). All 20 ExceptionBean specs pass on BoxLang.

Jira Issues

https://ortussolutions.atlassian.net/browse/COLDBOX-1462

Type of change

  • Bug Fix

Checklist

  • My code follows the style guidelines of this project cfformat
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

🤖 Generated with Claude Code

https://claude.ai/code/session_01SnmFsqBfa9SR4V1rRXw57X


Generated by Claude Code

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
@github-actions

Copy link
Copy Markdown

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 603376c. ± Comparison against base commit d67cc5c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnmFsqBfa9SR4V1rRXw57X

lmajano commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

tests / Test Suites (adobe@2023, 11, true, 8) failed on 6eed640 with a single spec, and it isn't caused by this PR. The spec is ModuleServiceTest "Still resolves a handler-only URL for a module with only a mandatory-action route", which errors with Error loading module routes as the module requested 'test-module-conventions' is not loaded.

development (d67cc5c) failed the same spec in today's Daily Test Run (38845241168), and it passes on other runs of that commit, so it looks order-dependent. No fix exists yet. The run on the current head (dbd4466) is in progress.

The earlier format check failure was this PR's; it is fixed in dbd4466.


Generated by Claude Code

@lmajano
lmajano merged commit 9c8730b into development Oct 16, 2026
16 of 19 checks passed
@lmajano
lmajano deleted the claude/exception-extendedinfo-string branch October 16, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants