Hyperlinkv0.8.0-beta.28

Request

Request.Errortypeeffect/Request.ts:140
Error<T>

A utility type to extract the error type from a Request.

Example (Extracting a request error type)

import type { Request } from "effect"

interface GetUser extends Request.Request<string, Error> {
  readonly id: number
}

// Extract the error type from a Request using the utility
type UserError = Request.Error<GetUser> // Error
utility types
Source effect/Request.ts:1401 lines
export type Error<T extends Request<any, any, any>> = [T] extends [Request<infer _A, infer _E, infer _R>] ? _E : never
Referenced by 13 symbols