MCPcopy
hub / github.com/fastify/fastify / manageErr

Function manageErr

fastify.js:545–561  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

543 }
544
545 function manageErr (err) {
546 // If the error comes out of Avvio's Error codes
547 // We create a make and preserve the previous error
548 // as cause
549 err = err != null && AVVIO_ERRORS_MAP[err.code] != null
550 ? appendStackTrace(err, new AVVIO_ERRORS_MAP[err.code](err.message))
551 : err
552
553 if (err) {
554 return fastify[kState].readyResolver.reject(err)
555 }
556
557 fastify[kState].readyResolver.resolve(fastify)
558 fastify[kState].booting = false
559 fastify[kState].ready = true
560 fastify[kState].readyResolver = null
561 }
562 }
563
564 // Used exclusively in TypeScript contexts to enable auto type inference from JSON schema.

Callers 1

runHooksFunction · 0.85

Calls 1

appendStackTraceFunction · 0.85

Tested by

no test coverage detected