Preparing search index...

    Function serializeError

    • 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.

      Parameters

      • err: unknown

        The caught value

      Returns Record<string, unknown>

      The error's name, message and stack, or its string form for non-Error values