# handleHttpServerError

Converts Effect HTTP server errors into empty 400, 404, or 500 responses.
Other failures remain in the global error channel.

## Signatures

```ts
export declare function handleHttpServerError(router: HttpRouter): Effect.Effect<void, never, HttpRouterRequest<"GlobalError", unknown>>;
```

## Why

Effect's structured server failures have a safe transport status, whereas
application/domain errors must remain visible for deliberate handling.

## Ownership and lifetime

The middleware is installed on the supplied router and runs in each request
lifetime. It allocates no long-lived resource and does not log, swallow, or
reclassify non-HttpServerError failures.

## Examples

```ts
import { handleHttpServerError } from "@typed/ui/HttpRouter"
import { Effect } from "effect"
import * as HttpRouter from "effect/unstable/http/HttpRouter"

const router = Effect.gen(function* () {
  const router = yield* HttpRouter.make
  yield* handleHttpServerError(router)
  return router
})
```
