new HttpException(response: string | any, status: number): HttpException
Base Nest application exception, which is handled by the default Exceptions Handler.
If you throw an exception from your HTTP route handlers, Nest will map them to the appropriate HTTP response and send to the client.
When response is an object:
object will be stringified and returned to the user as a JSON response,
Base Nest application exception, which is handled by the default Exceptions Handler. If you throw an exception from your HTTP route handlers, Nest will map them to the appropriate HTTP response and send to the client.
When
response
is an object:When
response
is a string:message: response, statusCode: X