#Why nestjs HttpStatus not included 423 Locked?
4 messages · Page 1 of 1 (latest)
that enum doesn't have all the http status code out there
just the common ones
as you can see, this was requested few times
if you really want to use the same enum, you can hacky around it like this:
import { HttpStatus as CoreHttpStatus } from '@nestjs/common'
enum MissingHttpStatus {
LOCKED = 423,
}
export type HttpStatus = CoreHttpStatus | MissingHttpStatus
export const HttpStatus = { ...CoreHttpStatus, ...MissingHttpStatus }
// ...
const myStatus = HttpStatus.UPGRADE_LOCKED