Skip to content

Commit

Permalink
chore(api-observability): change log type of presentable error to info
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmasberg committed Feb 1, 2024
1 parent 7a748d5 commit 353eee9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ describe('SentryExceptionsFilter', () => {

sentryExceptionsFilter.catch(presentableException);

expect(logger.error).toHaveBeenCalledTimes(1);
expect(logger.error).toHaveBeenCalledWith('message', undefined, {
expect(logger.log).toHaveBeenCalledTimes(1);
expect(logger.log).toHaveBeenCalledWith('message', {
name: 'Error',
code: 'code',
stack: expect.any(String),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class SentryExceptionsFilter implements ExceptionFilter {
catch(exception: unknown): void {
if (exception instanceof PresentableException) {
// if this is a presentable error, such as a validation error, we don't want to log it as an error but rather as an information to have the context for possible future debugging
this.logger.error(exception.message, undefined, {
this.logger.log(exception.message, {
code: exception.code,
name: exception.name,
stack: exception.stack,
Expand Down

0 comments on commit 353eee9

Please sign in to comment.