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

Function defaultBuildPrettyMeta

fastify.js:938–949  ·  view source on GitHub ↗
(route)

Source from the content-addressed store, hash-verified

936}
937
938function defaultBuildPrettyMeta (route) {
939 // return a shallow copy of route's sanitized context
940
941 const cleanKeys = {}
942 const allowedProps = ['errorHandler', 'logLevel', 'logSerializers']
943
944 allowedProps.concat(supportedHooks).forEach(k => {
945 cleanKeys[k] = route.store[k]
946 })
947
948 return Object.assign({}, cleanKeys)
949}
950
951function defaultClientErrorHandler (err, socket) {
952 // In case of a connection reset, the socket has been destroyed and there is nothing that needs to be done.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected