Built-in HTTP exceptions

홍예림·2023년 3월 16일
0

JavaScript & 웹 백엔드

목록 보기
18/19

📌NestJS docs

자바스크립트, 노드, 네스트, 타입스크립트를 활용해서 예외처리를 할 때 참고용
클라이언트 측에 보여주는 에러제목 리스트

각 예외들을 어떨 때 적용해야 할지는 HTTP 에러 목록을 참고하려 한다
MDN : HTTP status code
이런식으로.

Built-in HTTP exceptions

Nest provides a set of standard exceptions that inherit from the base HttpException. These are exposed from the @nestjs/common package, and represent many of the most common HTTP exceptions:

  • BadRequestException
  • UnauthorizedException
  • NotFoundException
  • ForbiddenException
  • NotAcceptableException
  • RequestTimeoutException
  • ConflictException
  • GoneException
  • HttpVersionNotSupportedException
  • PayloadTooLargeException
  • UnsupportedMediaTypeException
  • UnprocessableEntityException
  • InternalServerErrorException
  • NotImplementedException
  • ImATeapotException
  • MethodNotAllowedException
  • BadGatewayException
  • ServiceUnavailableException
  • GatewayTimeoutException
  • PreconditionFailedException
profile
SYNC 5반 2023.07 - 2023.12

0개의 댓글