sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

feat(node): Add shouldHandleError option to fastify error handler

Open AbhiPrasad opened this issue 1 year ago • 1 comments

resolves https://github.com/getsentry/sentry-javascript/issues/13197

Aligns fastify error handler with the express one.

  1. Adds shouldHandleError to allow users to configure if errors should be captured
  2. Makes sure the default shouldHandleError only captures errors for 5xx status codes.

AbhiPrasad avatar Aug 02 '24 14:08 AbhiPrasad

@magnusburton Hi, there might be some communication issue since I'm not working on it. Just looked at the changes.

xr0master avatar Oct 12 '24 10:10 xr0master

@AbhiPrasad thanks for taking this on!

Is there anything I can do to help get this shipped?

maxbeatty avatar Oct 23 '24 03:10 maxbeatty

@lforst is there anything I can do to help get this merged? Thanks!

maxbeatty avatar Oct 31 '24 18:10 maxbeatty

I was just reminded by this PR - I had accidentally unsubscribed from it. Apologies about the delay, I'm pushing up changes now, let's get this to the finish line.

Sorry about the trouble everyone - totally my fault!

AbhiPrasad avatar Nov 04 '24 18:11 AbhiPrasad

@AbhiPrasad can we get this merged? :D

mydea avatar Mar 18 '25 09:03 mydea

This got pretty stale, so opened https://github.com/getsentry/sentry-javascript/pull/15771, added a test as well, as well as better docstrings.

AbhiPrasad avatar Mar 21 '25 02:03 AbhiPrasad