parent
8bc01d3f24
commit
58ae9b589a
|
@ -1,24 +0,0 @@
|
|||
import { IsString } from 'class-validator';
|
||||
import { NotAcceptableError, NotFoundError } from 'routing-controllers';
|
||||
|
||||
/**
|
||||
* Error to throw, when to provided address doesn't belong to the accepted types.
|
||||
*/
|
||||
export class AddressWrongTypeError extends NotAcceptableError {
|
||||
@IsString()
|
||||
name = "AddressWrongTypeError"
|
||||
|
||||
@IsString()
|
||||
message = "The address must be an existing address's id. \n You provided a object of another type."
|
||||
}
|
||||
|
||||
/**
|
||||
* Error to throw, when a non-existent address get's loaded.
|
||||
*/
|
||||
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."
|
||||
}
|
Loading…
Reference in New Issue