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 AddressWrongTypeError extends NotAcceptableError {
@IsString()
name = "AddressWrongTypeError"
@IsString()
message = "The 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 AddressNotFoundError extends NotFoundError {
@IsString()
name = "AddressNotFoundError"
@IsString()
message = "The address you provided couldn't be located in the system. \n Please check your request."
}