export class NotFoundError extends Error { public code: number constructor(message?: string) { super(message) this.code = 404 Error.captureStackTrace(this, NotFoundError) } } export class WrongInputError extends Error { public code: number constructor(message?: string) { super(message) this.code = 400 Error.captureStackTrace(this, WrongInputError) } } export class InternalError extends Error { public code: number constructor(message?: string) { super(message) this.code = 500 Error.captureStackTrace(this, InternalError) } } export class AlreadyExists extends Error { public code: number constructor(message?: string) { super(message) this.code = 409 Error.captureStackTrace(this, AlreadyExists) } }