18
src/errors/GroupContactErrors.ts
Normal file
18
src/errors/GroupContactErrors.ts
Normal 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."
|
||||
}
|
||||
Reference in New Issue
Block a user