Converts a caught value into a plain object that survives log serialization.
Error instances serialize to {} with JSON.stringify because their fields are non-enumerable, so their name, message and stack are copied explicitly.
{}
The caught value
The error's name, message and stack, or its string form for non-Error values
Converts a caught value into a plain object that survives log serialization.
Error instances serialize to
{}with JSON.stringify because their fields are non-enumerable, so their name, message and stack are copied explicitly.