MCPcopy
hub / github.com/fastify/fastify / validateAsyncHeaders

Function validateAsyncHeaders

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

Source from the content-addressed store, hash-verified

234}
235
236function validateAsyncHeaders (validatePromise, context, request) {
237 return validatePromise
238 .then((headersResult) => {
239 if (headersResult) {
240 return wrapValidationError(headersResult, 'headers', context.schemaErrorFormatter)
241 }
242
243 return false
244 })
245}
246
247function wrapValidationError (result, dataVar, schemaErrorFormatter) {
248 if (result instanceof Error) {

Callers 1

validateFunction · 0.85

Calls 2

wrapValidationErrorFunction · 0.85
thenMethod · 0.80

Tested by

no test coverage detected