Skip to main content

EventError

Hierarchy

  • Error
    • EventError

Implements

  • HttpError

Index

Constructors

publicconstructor

Properties

publicattributes

attributes: unknown

publicerror

error: string

publicerrorHandling

errorHandling: graceful | throw

publicexpose

expose: boolean

publicforceLevel

forceLevel: undefined | error | info | warning

publicheaders

headers: undefined | HTTPHeaders

publicisEventError

isEventError: boolean = true

publicmessage

message: string

publicoriginal

original: unknown

publicstatusCode

statusCode: number

publicthrown

thrown: boolean

publicstaticerrors

errors: undefined | ErrorObject<string, Record<string, any>, unknown>[] = HttpError.errors

publicstaticis

is: (o: unknown) => o is HttpError = HttpError.is

Type declaration

    • (o: unknown): o is HttpError
    • Parameters

      • o: unknown

      Returns o is HttpError

publicstaticparse

parse: (o: unknown) => { right: HttpError } | { left: DefinedError[] } = HttpError.parse

Type declaration

    • (o: unknown): { right: HttpError } | { left: DefinedError[] }
    • Parameters

      • o: unknown

      Returns { right: HttpError } | { left: DefinedError[] }

publicstaticschema

schema: AnySchema = HttpError.schema

publicstaticvalidate

validate: ValidateFunction<HttpError> = HttpError.validate

Accessors

publicisClientError

  • get isClientError(): boolean
  • Returns boolean

publicisInformational

  • get isInformational(): boolean
  • Returns boolean

publicisRedirection

  • get isRedirection(): boolean
  • Returns boolean

publicisServerError

  • get isServerError(): boolean
  • Returns boolean

publicisSuccess

  • get isSuccess(): boolean
  • Returns boolean

publiclevel

  • get level(): error | info | warning
  • Returns error | info | warning

Methods

publicstatic_is

publicstaticbadGateway

publicstaticbadRequest

publicstaticconflict

publicstaticexpectationFailed

publicstaticfailedDependency

publicstaticforbidden

publicstaticfrom

publicstaticgatewayTimeout

publicstaticgone

publicstaticinternal

publicstaticinternalServerError

publicstaticlengthRequired

publicstaticlocked

publicstaticlog

  • Parameters

    • logger: Logger
    • error: unknown
    • mode: error | level = 'level'

    Returns EventError

publicstaticloopDetected

publicstaticmethodNotAllowed

publicstaticnoResponse

publicstaticnotAcceptable

publicstaticnotFound

publicstaticnotImplemented

publicstaticpayloadTooLarge

publicstaticpaymentRequired

publicstaticpreconditionFailed

publicstaticpreconditionRequired

publicstaticproxyAuthRequired

publicstaticrangeNotSatisfiable

publicstaticrequestTimeout

publicstaticretryable

publicstaticserviceUnavailable

publicstaticteapot

publicstatictooEarly

publicstatictooManyRequests

publicstaticunauthorized

publicstaticunavailableForLegalReasons

publicstaticunexpectedEventType

publicstaticunprocessableEntity

publicstaticunsupportedMediaType

publicstaticuriTooLong

publicstaticvalidation

  • validation(options?: EventOptions & ({ errors?: null | ErrorObject<string, Record<string, any>, unknown>[]; location?: string } | { left?: null | ErrorObject<string, Record<string, any>, unknown>[]; location?: string })): EventError
  • Parameters

    • options: EventOptions & ({ errors?: null | ErrorObject<string, Record<string, any>, unknown>[]; location?: string } | { left?: null | ErrorObject<string, Record<string, any>, unknown>[]; location?: string }) = {}

    Returns EventError