Skip to content

Preserve original error and stack trace on hb appender - #517

Merged
ektor-vrettakis merged 1 commit into
masterfrom
preserve-original-error-and-stack-trace-on-hb-appender
Sep 7, 2026
Merged

Preserve original error and stack trace on hb appender#517
ektor-vrettakis merged 1 commit into
masterfrom
preserve-original-error-and-stack-trace-on-hb-appender

Conversation

@ektor-vrettakis

@ektor-vrettakis ektor-vrettakis commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Preserve previously discarded non-enumerable error properties by exposing the actual Error instance when one is present, while retaining any additional information as extra context.

Callers commonly log a descriptive string before the real error, e.g. logger.error('Notifications scheduler failed with error:', err)

Previously, the descriptive string was always reported as the error, causing the real Error's message and stack to be discarded. Only its own enumerable properties were preserved through buildContext.

e.g. https://app.honeybadger.io/projects/102562/faults/116056135

…sing the actual error instance when present & keep additional info as extra content

@klesgidis klesgidis 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.

💯

@ektor-vrettakis
ektor-vrettakis merged commit 0a5f2f3 into master Sep 7, 2026
14 checks passed
@ektor-vrettakis
ektor-vrettakis deleted the preserve-original-error-and-stack-trace-on-hb-appender branch September 7, 2026 11:17
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.

3 participants