MCPcopy Create free account
hub / github.com/fastify/fastify / handler

Function handler

lib/handle-request.js:74–89  ·  view source on GitHub ↗
(request, reply)

Source from the content-addressed store, hash-verified

72}
73
74function handler (request, reply) {
75 try {
76 if (request[kRouteContext].preValidation !== null) {
77 preValidationHookRunner(
78 request[kRouteContext].preValidation,
79 request,
80 reply,
81 preValidationCallback
82 )
83 } else {
84 preValidationCallback(null, request, reply)
85 }
86 } catch (err) {
87 preValidationCallback(err, request, reply)
88 }
89}
90
91function preValidationCallback (err, request, reply) {
92 if (reply.sent === true) return

Callers 3

handleRequestFunction · 0.70
onDoneFunction · 0.70

Calls 1

preValidationCallbackFunction · 0.85

Tested by

no test coverage detected