Skip to content

chore(logs): log non enumerable fields when unexpected error is thrown#526

Merged
apsantiso merged 1 commit into
masterfrom
chore/print-message-and-stack-global-exception-filter
Apr 18, 2025
Merged

chore(logs): log non enumerable fields when unexpected error is thrown#526
apsantiso merged 1 commit into
masterfrom
chore/print-message-and-stack-global-exception-filter

Conversation

@apsantiso

@apsantiso apsantiso commented Apr 18, 2025

Copy link
Copy Markdown
Collaborator

We are using JSON.stringify to get a one line log when there's an unexpected error. It only prints enumerable fields, so when we try to read a default javascript Error object, it does not print the error, that's why we need to declare them manually.

Changes

  1. Added message and stack to the error object instead of just trying to print the entire error.
  2. Removed old exception filter.

@apsantiso apsantiso self-assigned this Apr 18, 2025
@apsantiso apsantiso added bug Something isn't working and removed ready-for-preview labels Apr 18, 2025
@sonarqubecloud

Copy link
Copy Markdown

@apsantiso apsantiso merged commit fb1f65c into master Apr 18, 2025
@apsantiso apsantiso deleted the chore/print-message-and-stack-global-exception-filter branch April 18, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant