epha-errors
v0.0.6
Published
Describe errors
Downloads
1
Readme
errors
var errors = require("epha-errors");
// Custom error
errors.badRequest({route:"xyz",reason:"id missing"});
// Custom error transform, route is optional
errors.customize(err,"route");
err {
code:"statusCode",
message:"status message",
data:"reason and route",
payload:"original error"
}