-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix: logging error messages and stack #843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 9b4847f The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I'm still confused as to why we need to write the object explicitly like this. I added this PR to address it and I do recall seeing error traces appear in Sentry using it. So, perhaps it's an issue with Note that this is not about blocking this PR; just an attempt at demystifying this issue. |
Codecov Report
@@ Coverage Diff @@
## develop #843 +/- ##
========================================
Coverage 82.21% 82.21%
========================================
Files 48 48
Lines 1895 1895
Branches 303 303
========================================
Hits 1558 1558
Misses 337 337 Continue to review full report at Codecov.
|
I'm not quite sure either, although I do think its a syntax thing when it comes to using the shorthand with a more complex type than a literal/basic object. If the errors were appearing in sentry then perhaps I am wrong but I do feel like I have encountered this error before in other projects |
* batch-submitter: log error explicitly * data-transport-layer: log error explicitly * message-relayer: log error explicitly * chore: add changeset
Description
This PR replaces all instances of
log.error({ err })in the codebase such that it logs the error message and stack. The stack should never be returned to the user via an HTTP request, only we should be able to see these messagesAdditional context
Previously these would log as empty objects so they wouldn't be particularly helpful