ExceptionManager is an utility class who can insert or erase custom error
class with its conversion method to a regular nest.HttpException
instance.
If you define an API function through TypedRoute or
EncryptedRoute instead of the basic router decorator functions like
nest.Get or nest.Post and the API function throws a custom
error whose class has been inserted in this
EntityManager, the error would be automatically converted to the regular
nest.HttpException instance by the ExceptionManager.Closure
function.
Therefore, with this ExceptionManager and TypedRoute or
EncryptedRoute, you can manage your custom error classes much
systemtically. You can avoid 500 internal server error or hard coding
implementation about the custom error classes.
Below error classes are defaultly configured in this ExceptionManager
Exception manager for HTTP server.
ExceptionManageris an utility class who can insert or erase custom error class with its conversion method to a regular nest.HttpException instance.If you define an API function through TypedRoute or EncryptedRoute instead of the basic router decorator functions like nest.Get or nest.Post and the API function throws a custom error whose class has been inserted in this
EntityManager, the error would be automatically converted to the regular nest.HttpException instance by the ExceptionManager.Closure function.Therefore, with this
ExceptionManagerand TypedRoute or EncryptedRoute, you can manage your custom error classes much systemtically. You can avoid 500 internal server error or hard coding implementation about the custom error classes.Below error classes are defaultly configured in this
ExceptionManagertypia.TypeGuardError@nestia/fetcher.HttpErrorAuthor
Jeongho Nam - https://github.com/samchon