MCPcopy
hub / github.com/fastify/fastify / preHandlerCallback

Function preHandlerCallback

lib/handle-request.js:133–153  ·  view source on GitHub ↗
(err, request, reply)

Source from the content-addressed store, hash-verified

131}
132
133function preHandlerCallback (err, request, reply) {
134 if (reply.sent) return
135
136 const context = request[kRouteContext]
137
138 if (!channels.hasSubscribers || context[kFourOhFourContext] === null) {
139 preHandlerCallbackInner(err, request, reply)
140 } else {
141 const store = {
142 request,
143 reply,
144 async: false,
145 route: {
146 url: context.config.url,
147 method: context.config.method
148 }
149 }
150 reply[kDiagnosticsStore] = store
151 channels.start.runStores(store, preHandlerCallbackInner, undefined, err, request, reply, store)
152 }
153}
154
155function preHandlerCallbackInner (err, request, reply, store) {
156 const context = request[kRouteContext]

Callers 2

validationCompletedFunction · 0.85

Calls 1

preHandlerCallbackInnerFunction · 0.85

Tested by

no test coverage detected