Skip to content

fix: use bunyan stdSerializers for error fields - #4496

Merged
skwowet merged 2 commits into
mainfrom
fix/cm-1280-bunyan-std-error-serializer
Aug 20, 2026
Merged

fix: use bunyan stdSerializers for error fields#4496
skwowet merged 2 commits into
mainfrom
fix/cm-1280-bunyan-std-error-serializer

Conversation

@skwowet

@skwowet skwowet commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

The Node 24 logging fix used Axios toJSON() so bunyan would not dump TLS sockets. That stopped the nango-worker crash, but toJSON() still includes the full request config, so prod logs for merge-suggestions 409s contained Authorization: Bearer ….

Bunyan 1.8.12 already allowlists error fields (message, name, stack, code, signal) for this reason. This PR switches to that serializer instead of a custom Axios shape.

Changes

  • Remove the homemade toJSON() error serializer in @crowd/logging
  • Use Bunyan.stdSerializers for err
  • Map Temporal’s top-level error field to the same bunyan serializer (log.error(err) already uses err; Temporal logs { error })

Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 20, 2026 11:34
@skwowet skwowet changed the title fix: use bunyan stdSerializers for error fields (CM-1280) fix: use bunyan stdSerializers for error fields Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates shared logging to prevent sensitive Axios configuration from appearing in logs.

Changes:

  • Uses Bunyan’s standard error serializers.
  • Maps Temporal’s error field to the standard err serializer.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings August 20, 2026 11:36
@skwowet
skwowet merged commit 16beee9 into main Aug 20, 2026
14 checks passed
@skwowet
skwowet deleted the fix/cm-1280-bunyan-std-error-serializer branch August 20, 2026 11:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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.

2 participants