MCPcopy
hub / github.com/fastify/fastify / onReadError

Function onReadError

lib/reply.js:797–808  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

795 }
796
797 function onReadError (err) {
798 sourceOpen = false
799 if (res.headersSent || reply.request.raw.aborted === true) {
800 if (!errorLogged) {
801 errorLogged = true
802 logStreamError(reply.log, err, reply)
803 }
804 res.destroy()
805 } else {
806 onErrorHook(reply, err)
807 }
808 }
809
810 reader.read().then(onRead, onReadError)
811}

Callers

nothing calls this directly

Calls 2

logStreamErrorFunction · 0.85
onErrorHookFunction · 0.85

Tested by

no test coverage detected