Exception manager for HTTP server.

ExceptionManager is an utility class who can insert or erase custom error class with its convertion 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

  • typia.TypeGuardError
  • @nestia/fetcher.HttpError

Jeongho Nam - https://github.com/samchon

Interfaces

Closure

Functions

erase
insert
off
on