import { IsString } from 'class-validator';
import { NotAcceptableError, NotFoundError } from 'routing-controllers';

/**
 * Error to throw when a Donation couldn't be found.
 */
export class DonationNotFoundError extends NotFoundError {
	@IsString()
	name = "DonationNotFoundError"

	@IsString()
	message = "Donation not found!"
}

/**
 * Error to throw when two Donations' ids don't match.
 * Usually occurs when a user tries to change a Donation's id.
 */
export class DonationIdsNotMatchingError extends NotAcceptableError {
	@IsString()
	name = "DonationIdsNotMatchingError"

	@IsString()
	message = "The ids don't match! \n And if you wanted to change a Donation's id: This isn't allowed!"
}