express-image-validator
Version:
Validator of various image parameters in Express.js applications
20 lines (19 loc) • 631 B
TypeScript
/**
* Represents an HTTP error with a status code and message.
*/
export declare class HttpError extends Error {
/** HTTP status code of the error. */
status: number;
/**
* Creates a new HttpError instance.
* @param { number } status HTTP status code.
* @param { string } message Error message.
*/
constructor(status: number, message: string);
/**
* Factory method for creating a 400 Bad Request error.
* @param { string } message Error message.
* @returns { HttpError } A new HttpError instance with status 400.
*/
static badRequest(message: string): HttpError;
}