Documentation
    Preparing search index...

    Interface Closure<T>

    Type of a closure function converting to the regular nest.HttpException.

    ExceptionManager.Closure is a type of closure function who are converting from custom error to the regular nest.HttpException instance. It would be used in the ExceptionManager with TypedRoute or EncryptedRoute.

    contracts/common.md#principled-implementation A converter is a function from the caught error to an HttpException, whose status and body become the response.

    contracts/common.md#clear-and-simple-design One call signature.

    contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.

    contracts/common.md#meaningful-documentation The comment documents the parameter and the return value.

    contracts/portability.md#os-neutral-implementation Converter ordering and listener registration operate on JavaScript class and function identity, not native path or process identity.

    Type Parameters

    • T extends Error
    • Error converter.

      Convert from custom error to the regular nest.HttpException instance.

      Parameters

      • exception: T

        Custom error instance

      Returns HttpException

      Regular nest.HttpException instance