import { DataAccessError } from './data-access.error';

/**
 * Represents an error that is thrown when a required property is empty.
 *
 * @remarks
 * This error is identified by the code 'PROPERTY_IS_EMPTY'.
 *
 * @param propertyName - The name of the property that is empty.
 *
 * @example
 * ```typescript
 * throw new PropertyIsEmptyError("username");
 * ```
 */
export class PropertyIsEmptyError extends DataAccessError<'PROPERTY_IS_EMPTY'> {
  constructor(propertyName: string) {
    super('PROPERTY_IS_EMPTY', `Property "${propertyName}" is empty.`);
  }
}
