Skip to content

Commit

Permalink
fix: undefined error property in json logging (#1564)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcroote authored Dec 1, 2022
1 parent 74f33ea commit 06d5d11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/strong-llamas-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@api3/airnode-utilities': patch
---

Fix logging undefined error property bug
2 changes: 1 addition & 1 deletion packages/airnode-utilities/src/logging/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function logFull(level: LogLevel, message: string, options: LogOptions |
}

json(level, message, options);
if (level === 'ERROR' && (options as ErrorLogOptions).error!.stack!) {
if (level === 'ERROR' && (options as ErrorLogOptions).error?.stack) {
json('ERROR', (options as ErrorLogOptions).error!.stack!, options);
}
}
Expand Down

0 comments on commit 06d5d11

Please sign in to comment.