new ErrorResponse( message, statusCode )

Description
Class to add a message and status code to the error object.
Parameters
Name Type Description
message string Message to be added to the error object.
statusCode number HTTP Status code to be added to the error object
Examples
const { ErrorResponse } = require("emfrest/utils")

Usage

error = new ErrorResponse(message, statusCode);
Details