mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
export declare class HttpException extends Error {
|
|
private readonly response;
|
|
private readonly status;
|
|
readonly message: any;
|
|
/**
|
|
<<<<<<< HEAD
|
|
* The 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.
|
|
=======
|
|
* The base Nest Application exception, which is handled by the default Exceptions Handler.
|
|
* If you throw an exception from your HTTP route handler, Nest will map them to the appropriate HTTP response and send to the client.
|
|
>>>>>>> master
|
|
*
|
|
* When `response` is an object:
|
|
* - object will be stringified and returned to the user as a JSON response,
|
|
*
|
|
* When `response` is a string:
|
|
* - Nest will create a response with two properties:
|
|
* ```
|
|
* message: response,
|
|
* statusCode: X
|
|
* ```
|
|
*/
|
|
constructor(response: string | object, status: number);
|
|
getResponse(): string | object;
|
|
getStatus(): number;
|
|
}
|