Skip to content

HttpErrorByCode

reference
1 min readUpdated

Kind: Constant

Source: packages/common/utils/http-error-by-code.util.ts

Part of: Common

Definition

ts
Record<ErrorHttpStatusCode, Type<unknown>>

Value

ts
{
  [HttpStatus.BAD_GATEWAY]: BadGatewayException,
  [HttpStatus.BAD_REQUEST]: BadRequestException,
  [HttpStatus.CONFLICT]: ConflictException,
  [HttpStatus.FORBIDDEN]: ForbiddenException,
  [HttpStatus.GATEWAY_TIMEOUT]: GatewayTimeoutException,
  [HttpStatus.GONE]: GoneException,
  [HttpStatus.HTTP_VERSION_NOT_SUPPORTED]: HttpVersionNotSupportedException,
  [HttpStatus.I_AM_A_TEAPOT]: ImATeapotE

Was this page helpful?

Download as PDF
HttpErrorByCode — NestJS head-to-head