We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99dfafa commit d39f0e4Copy full SHA for d39f0e4
src/mongo_logger.ts
@@ -425,7 +425,11 @@ export function stringifyWithMaxLen(
425
} else if (typeof value === 'function') {
426
strToTruncate = value.toString();
427
} else {
428
- strToTruncate = EJSON.stringify(value, options);
+ try {
429
+ strToTruncate = EJSON.stringify(value, options);
430
+ } catch (e) {
431
+ strToTruncate = `Extended JSON serialization failed with: ${e.message}`;
432
+ }
433
}
434
435
// handle truncation that occurs in the middle of multi-byte codepoints
0 commit comments