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 8cfc94c commit 68c0c00Copy full SHA for 68c0c00
src/mongo_logger.ts
@@ -420,7 +420,11 @@ export function stringifyWithMaxLen(
420
} else if (typeof value === 'function') {
421
strToTruncate = value.toString();
422
} else {
423
- strToTruncate = EJSON.stringify(value, options);
+ try {
424
+ strToTruncate = EJSON.stringify(value, options);
425
+ } catch (e) {
426
+ strToTruncate = `Extended JSON serialization failed with: ${e.message}`;
427
+ }
428
}
429
430
// handle truncation that occurs in the middle of multi-byte codepoints
0 commit comments