Skip to content
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

fix(api-observability): log unhandled exceptions caught in exceptions… #653

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

timonmasberg
Copy link
Member

… filter

Description

Also logging unhandled exceptions caught in the exceptions filter to the console by using the logger service.

Checklist:

  • The title of this PR and the commit history is conform with
    the Conventional Commits specification.
  • I have performed a self-review of my own code.
  • My changes generate no new warnings, SonarCloud reports no Vulnerabilities, Bugs or Code Smells.
  • I have added tests (unit and E2E if user-facing) that prove my fix is effective or that my feature works,
    Coverage > 80% and not less than the current coverage of the main branch.
  • The PR branch is up-to-date with the base branch. In case you merged main into your feature branch, make sure you have run the latest NX migrations (nx migrate --run-migrations).

@timonmasberg timonmasberg enabled auto-merge (squash) February 1, 2024 11:02
name: exception.name,
stack: exception.stack,
},
this.logger.error(exception.message, undefined, {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
this.logger.error(exception.message, undefined, {
this.logger.info(exception.message, undefined, {

Shouldn't this be .info to log for debug purpose and not as error?

Copy link
Member Author

Choose a reason for hiding this comment

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

changed to log type info: 353eee9

Copy link

sonarcloud bot commented Feb 1, 2024

@timonmasberg timonmasberg merged commit 06f1d93 into main Feb 1, 2024
10 checks passed
@timonmasberg timonmasberg deleted the chore/log-unhandled-errors branch February 1, 2024 11:35
@timonmasberg
Copy link
Member Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants