Skip to content

Commit 31064f7

Browse files
committed
return object from normalize in case of error, including error message
1 parent 1f12a1c commit 31064f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/utils/src/normalize.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export function normalize(input: unknown, depth: number = +Infinity, maxProperti
3535
try {
3636
// since we're at the outermost level, there is no key
3737
return visit('', input, depth, maxProperties);
38-
} catch (_oO) {
39-
return '**non-serializable**';
38+
} catch (err) {
39+
return { ERROR: `**non-serializable** (${err})` };
4040
}
4141
}
4242

0 commit comments

Comments
 (0)