export class HttpError extends Error {
  constructor(public status: number, message: string) {
    super(message);
  }
}

export class UserInputError extends HttpError {
  constructor(message: string) {
    super(400, message);
  }
}

export class ForbiddenError extends HttpError {
  constructor(message: string) {
    super(403, message);
  }
}

export class NotFoundError extends HttpError {
  constructor(message: string) {
    super(404, message);
  }
}

src/shared/errors.ts