Skip to content

Surface missing methods inside qb callbacks - #319

Merged
elpete merged 4 commits into
nextfrom
fix/142-when-error-message
Aug 22, 2026
Merged

Surface missing methods inside qb callbacks#319
elpete merged 4 commits into
nextfrom
fix/142-when-error-message

Conversation

@elpete

@elpete elpete commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #142

Issue review

This is a valid error-reporting bug and a strong fit for Quick. The public call is when, but the actionable failure occurs on the Quick-aware builder passed to its callback. Reporting the wrapper method forces developers to read a nested message and can make a supported qb method look broken.

Recommendation: 9/10 — implement.

Reasons for:

  • the top-level exception should identify the method the developer needs to fix
  • the correction applies to qb callbacks generally, not only when
  • the implementation preserves the existing QuickMissingMethod text and underlying qb exception details

Tradeoffs:

  • missing methods reached through QuickQB now become QuickMissingMethod at that boundary instead of bubbling as QBMissingMethod to an outer wrapper
  • callers that inspect the outer method name in this erroneous path will now receive the more specific inner name

Reproduction and fix

The regression was written first through the public Quick API:

getInstance( "User" ).when( true, function( q ) {
    q.missingScopeInsideWhen();
} );

With the current qb 14.0.0-beta.3, the test failed because the top-level message said Quick could not handle [when]; the actual [missingScopeInsideWhen] error was nested later in the message.

QuickQB.onMissingMethod now converts qb's terminal missing-method exception at the point where the inner method name is still known. The outer entity handler therefore receives the already-actionable Quick exception and does not relabel it as when.

Validation

  • focused scope and error-message suites: 17 passed, 0 failed, 0 errors
  • full Lucee 6 suite with qb 14.0.0-beta.3: 496 passed, 0 failed, 0 errors, 3 skipped
  • formatter completed
  • git diff --check passed

@elpete
elpete merged commit 908a44e into next Aug 22, 2026
14 checks passed
@elpete
elpete deleted the fix/142-when-error-message branch August 22, 2026 18:38
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.

1 participant