More dynamic creation of objects

ref #13
This commit is contained in:
2020-12-05 15:50:28 +01:00
parent 975d30e411
commit 4352910d54
10 changed files with 212 additions and 67 deletions

View File

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