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
Error logs are muted when using wrapRemixHandleError as a handleError function in Remix #11615
General note: Ideally, our SDK just grabs the error and sends it to Sentry. We generally always rethrow/pass down the error so that you can handle it yourself afterwards. In some cases, this a bit tricky or unavoidable slightly modifies the default behaviour (e.g. error message formatting in NodeJS). However, if we can, we should still rethrow the error (however that works for Remix specifically).
When handleError is used, Remix disables the built-in error logging for the errors that end up inside that utility (Remix Docs) So, this seems like the expected Remix behaviour.
That said, as @Lms24 mentioned, I also checked the other places we handle / report errors like loader / action / documentRequest, and indeed we seem to be swallowing them. So I'll open a PR to fix that. That will probably fix the issue you have reported (as you're throwing error from the loader). But not all the errors that are handled by wrapRemixHandleError.
Activity
Lms24 commentedon Apr 16, 2024
Hey @thomasverleye thanks for writing in! I'm gonna ask @onurtemizkan to please take a look, thanks!
General note: Ideally, our SDK just grabs the error and sends it to Sentry. We generally always rethrow/pass down the error so that you can handle it yourself afterwards. In some cases, this a bit tricky or unavoidable slightly modifies the default behaviour (e.g. error message formatting in NodeJS). However, if we can, we should still rethrow the error (however that works for Remix specifically).
onurtemizkan commentedon Apr 25, 2024
Hey @thomasverleye, thanks for reporting.
When
handleErroris used, Remix disables the built-in error logging for the errors that end up inside that utility (Remix Docs) So, this seems like the expected Remix behaviour.That said, as @Lms24 mentioned, I also checked the other places we handle / report errors like
loader/action/documentRequest, and indeed we seem to be swallowing them. So I'll open a PR to fix that. That will probably fix the issue you have reported (as you're throwing error from theloader). But not all the errors that are handled bywrapRemixHandleError.