-
new ErrorResponse( message, statusCode )
-
Description
Class to add a message and status code to the error object.Parameters
Name Type Description messagestring Message to be added to the error object. statusCodenumber HTTP Status code to be added to the error object Examples
const { ErrorResponse } = require("emfrest/utils")Usage
error = new ErrorResponse(message, statusCode);Details