Skip to content

Commit

Permalink
fix: undefined error property in json logging (#1584)
Browse files Browse the repository at this point in the history
Co-authored-by: Derek Croote <[email protected]>
  • Loading branch information
Siegrift and dcroote authored Dec 5, 2022
1 parent d594358 commit 3571c24
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 3571c24

Please sign in to comment.