You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[framework-context] Preserve the primary request failure when onRequestError throws #2007
The request catch path awaits onRequestError before rethrowing the captured application failure. If the hook rejects, its error replaces the primary request error.
Evidence
Source of truth: origin/trunk@678073d994294db7e21b5a4d0a004a087ea498e0.
packages/framework-context/src/libs/Context.ts:103-120 invokes and awaits onRequestError inside the catch block before rethrowing the captured value.
Desired outcome
Request callers, filters, and telemetry always receive the original failure while hook failures remain observable.
Proposed implementation
Contain onRequestError failure separately from the primary request error.
Report or attach hook-failure diagnostics without changing the primary rejection.
Cover Error and non-Error primary failures.
Acceptance criteria
The original failure identity is preserved when onRequestError succeeds or fails.
Activity