@@ -4,7 +4,7 @@ import { NotAcceptableError, NotFoundError } from 'routing-controllers';
|
||||
|
||||
/**
|
||||
* Error to throw when no username or email is set.
|
||||
* We somehow need to identify you :)
|
||||
* We somehow need to identify you on login.
|
||||
*/
|
||||
export class UsernameOrEmailNeededError extends NotFoundError {
|
||||
@IsString()
|
||||
@@ -14,6 +14,18 @@ export class UsernameOrEmailNeededError extends NotFoundError {
|
||||
message = "No username or email is set!"
|
||||
}
|
||||
|
||||
/**
|
||||
* Error to throw when no email is set.
|
||||
* We somehow need to identify you :)
|
||||
*/
|
||||
export class UserEmailNeededError extends NotFoundError {
|
||||
@IsString()
|
||||
name = "UserEmailNeededError"
|
||||
|
||||
@IsString()
|
||||
message = "No email is set! \n You have to provide email addresses for users (used for password reset among others)."
|
||||
}
|
||||
|
||||
/**
|
||||
* Error to throw when a user couldn't be found.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user