Skip to content

Commit 79faca4

Browse files
committed
fix: improve error serialization check in serializeErr function
1 parent 6d56e36 commit 79faca4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/logger/serializers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @returns {object}
77
*/
88
function serializeErr(error) {
9-
if (!error || typeof error !== 'object') {
9+
if (!Error.isError(error)) {
1010
return error;
1111
}
1212

0 commit comments

Comments
 (0)