export class ReviewNotEligibleError extends Error {
  constructor() {
    super('Only delivered order items can be reviewed');
    this.name = 'ReviewNotEligibleError';
  }
}

export class DuplicateReviewError extends Error {
  constructor() {
    super('A review already exists for this order item');
    this.name = 'DuplicateReviewError';
  }
}

export class ReviewNotFoundError extends Error {
  constructor() {
    super('Review not found');
    this.name = 'ReviewNotFoundError';
  }
}

export class InvalidReviewError extends Error {
  constructor(message = 'Invalid review') {
    super(message);
    this.name = 'InvalidReviewError';
  }
}
