export class CategorySlugAlreadyExistsError extends Error {
  constructor() {
    super('Category slug already exists');
    this.name = 'CategorySlugAlreadyExistsError';
  }
}

export class CategoryParentNotFoundError extends Error {
  constructor() {
    super('Category parent not found');
    this.name = 'CategoryParentNotFoundError';
  }
}

export class CategoryTreeCycleError extends Error {
  constructor() {
    super('Category parent would create a cycle');
    this.name = 'CategoryTreeCycleError';
  }
}

export class CategoryParentNotContainerError extends Error {
  constructor() {
    super(
      'Category parent must be a parent (container) category; a child cannot contain categories',
    );
    this.name = 'CategoryParentNotContainerError';
  }
}
