MCPcopy Index your code
hub / github.com/restify/node-restify / reject

Function reject

lib/chain.js:200–215  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

198 }
199
200 function reject(error) {
201 if (!(error instanceof Error)) {
202 error = new customErrorTypes.AsyncError(
203 {
204 info: {
205 cause: error,
206 handler: handler._name,
207 method: req.method,
208 path: req.path ? req.path() : undefined
209 }
210 },
211 'Async middleware rejected without an error'
212 );
213 }
214 return next(error);
215 }
216
217 if (hasError && arity === 4) {
218 // error-handling middleware

Callers

nothing calls this directly

Calls 1

nextFunction · 0.70

Tested by

no test coverage detected