Skip to main content Link Search Menu Expand Document (external link)

ServerError overview

Added in v1.0.0


Table of contents


error

HttpServerError (type alias)

Signature

export type HttpServerError = RequestError | ResponseError | RouteNotFound | ServeError

Added in v1.0.0

RequestError

Signature

export declare const RequestError: (props: Omit<RequestError, HttpError.ProvidedFields>) => RequestError

Added in v1.0.0

RequestError (interface)

Signature

export interface RequestError extends HttpError.Proto {
  readonly _tag: "RequestError"
  readonly request: ServerRequest.ServerRequest
  readonly reason: "Transport" | "Decode"
  readonly error: unknown
}

Added in v1.0.0

ResponseError

Signature

export declare const ResponseError: (props: Omit<ResponseError, HttpError.ProvidedFields>) => ResponseError

Added in v1.0.0

ResponseError (interface)

Signature

export interface ResponseError extends HttpError.Proto {
  readonly _tag: "ResponseError"
  readonly request: ServerRequest.ServerRequest
  readonly response: ServerResponse.ServerResponse
  readonly reason: "Decode"
  readonly error: unknown
}

Added in v1.0.0

RouteNotFound

Signature

export declare const RouteNotFound: (props: Omit<RouteNotFound, HttpError.ProvidedFields>) => RouteNotFound

Added in v1.0.0

RouteNotFound (interface)

Signature

export interface RouteNotFound extends HttpError.Proto {
  readonly _tag: "RouteNotFound"
  readonly request: ServerRequest.ServerRequest
}

Added in v1.0.0

ServeError

Signature

export declare const ServeError: (props: Omit<ServeError, HttpError.ProvidedFields>) => ServeError

Added in v1.0.0

ServeError (interface)

Signature

export interface ServeError extends HttpError.Proto {
  readonly _tag: "ServeError"
  readonly error: unknown
}

Added in v1.0.0

predicates

isServerError

Signature

export declare const isServerError: (u: unknown) => u is HttpServerError

Added in v1.0.0

type id

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v1.0.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v1.0.0

utils

HttpError (namespace)

Added in v1.0.0

Proto (interface)

Signature

export interface Proto extends Data.Case {
  readonly [TypeId]: TypeId
  readonly _tag: string
}

Added in v1.0.0

ProvidedFields (type alias)

Signature

export type ProvidedFields = TypeId | "_tag" | keyof Data.Case

Added in v1.0.0

clientAbortFiberId

Signature

export declare const clientAbortFiberId: FiberId.FiberId

Added in v1.0.0

isClientAbortCause

Signature

export declare const isClientAbortCause: <E>(cause: Cause.Cause<E>) => boolean

Added in v1.0.0