MCPcopy Create free account
hub / github.com/Effect-TS/effect / sendUnhandled

Function sendUnhandled

packages/effect/src/http/HttpEffect.ts:139–147  ·  view source on GitHub ↗
(
    frame: RequestFrame,
    response: HttpServerResponse
  )

Source from the content-addressed store, hash-verified

137
138 // Recover hook failures with an error response, but never retry a response write.
139 const sendUnhandled = (
140 frame: RequestFrame,
141 response: HttpServerResponse
142 ): Effect.Effect<unknown, EH | HttpServerError, RH> =>
143 Effect.catchCause(Effect.suspend(() => sendResponse(frame, response)), (cause) => {
144 if (handledSymbol in frame.request) return Effect.failCause(cause)
145 reportServerCauseUnsafe(Fiber.getCurrent()!, cause)
146 return sendCause(frame, cause)
147 })
148
149 const sendCause = (
150 frame: RequestFrame,

Callers 2

onSuccessFunction · 0.85
sendCauseFunction · 0.85

Calls 3

sendResponseFunction · 0.85
reportServerCauseUnsafeFunction · 0.85
sendCauseFunction · 0.85

Tested by

no test coverage detected