@@ -1,6 +1,9 @@
|
||||
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"
|
||||
@@ -9,6 +12,9 @@ export class AddressWrongTypeError extends NotAcceptableError {
|
||||
message = "The address must be an existing adress's id. \n You provided a object of another type."
|
||||
}
|
||||
|
||||
/**
|
||||
* Error to throw, when a non-existant address get's loaded.
|
||||
*/
|
||||
export class AddressNotFoundError extends NotFoundError {
|
||||
@IsString()
|
||||
name = "AddressNotFoundError"
|
||||
|
||||
Reference in New Issue
Block a user