backend/src/errors/ParticipantErrors.ts

18 lines
663 B
TypeScript

import { IsString } from 'class-validator';
import { NotAcceptableError, NotFoundError } from 'routing-controllers';
export class ParticipantAddressWrongTypeError extends NotAcceptableError {
@IsString()
name = "ParticipantAddressWrongTypeError"
@IsString()
message = "The participant's address must be either a existing address, new address or a existing adress's id. \n You provided a object of another type."
}
export class ParticipantAddressNotFoundError extends NotFoundError {
@IsString()
name = "ParticipantAddressNotFoundError"
@IsString()
message = "The address you provided couldn't be located in the system. \n Please check your request."
}