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

Function validateAsyncHeaders

lib/validation.js:245–254  ·  view source on GitHub ↗
(validatePromise, context, request)

Source from the content-addressed store, hash-verified

243}
244
245function validateAsyncHeaders (validatePromise, context, request) {
246 return validatePromise
247 .then((headersResult) => {
248 if (headersResult) {
249 return wrapValidationError(headersResult, 'headers', context.schemaErrorFormatter)
250 }
251
252 return false
253 })
254}
255
256function wrapValidationError (result, dataVar, schemaErrorFormatter) {
257 if (result instanceof Error) {

Callers 1

validateFunction · 0.85

Calls 2

wrapValidationErrorFunction · 0.85
thenMethod · 0.80

Tested by

no test coverage detected