Skip to content

feat(effects): surface error message and stack trace in effects panel#61

Merged
adxdits merged 1 commit intoAmadeusITGroup:masterfrom
vineethwilson15:feat/effect-error-details
Mar 17, 2026
Merged

feat(effects): surface error message and stack trace in effects panel#61
adxdits merged 1 commit intoAmadeusITGroup:masterfrom
vineethwilson15:feat/effect-error-details

Conversation

@vineethwilson15
Copy link
Copy Markdown

Closes #41

When an NgRx effect throws, the effects panel now shows the error message
inline and a collapsible stack trace — no more opening the browser console.

Changes:

  • core.models.ts: add errorMessage/errorStack to DevToolEffectEventPayload
  • actions-interceptor.service.ts: extract and forward error details in EFFECT_EVENT messages
  • effects-panel.models.ts: add errorMessage/errorStack to EffectEventMessage and EffectExecution
  • effects-panel.component.ts: populate error fields in effectExecutions computed signal
  • effects-panel.component.html: render error message inline; collapsible stack trace via <details>
  • effects-panel.component.scss: styles for error message and stack trace
  • actions-interceptor.service.spec.ts: 3 new unit tests covering error forwarding

@adxdits
Copy link
Copy Markdown
Member

adxdits commented Mar 14, 2026

Hello, thanks for contributing 👑 will review it next week

@adxdits adxdits self-requested a review March 14, 2026 22:19
Copy link
Copy Markdown
Member

@adxdits adxdits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍 my only suggestion would be that in actions-interceptor.service.ts errorMessage and errorStack are extracted and sent for every effect event, even non-error ones (where they'll be undefined). This works correctly due to JSON.stringify omitting undefined values, but it would be slightly cleaner to only compute them when event.lifecycle === 'error'

@adxdits adxdits merged commit 7fe52db into AmadeusITGroup:master Mar 17, 2026
3 checks passed
@vineethwilson15
Copy link
Copy Markdown
Author

Thanks for the feedback and for merging! That's a fair point — computing errorMessage/errorStack unconditionally is harmless but unnecessarily runs for non-error events.

Happy to open a small follow-up refactor PR that moves the extraction inside an if (event.lifecycle === 'error') guard. Let me know if you'd like that, or if you'd prefer to address it as part of a future cleanup.

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.

[Feature]: Effect error details: message and stack trace

2 participants