25 lines
549 B
TypeScript
25 lines
549 B
TypeScript
import { NotFoundError } from 'routing-controllers';
|
|
import { IsString } from 'class-validator';
|
|
|
|
/**
|
|
* Error to throw when a usergroup couldn't be found.
|
|
*/
|
|
export class UserGroupNotFoundError extends NotFoundError {
|
|
@IsString()
|
|
name = "UserGroupNotFoundError"
|
|
|
|
@IsString()
|
|
message = "User Group not found!"
|
|
}
|
|
|
|
/**
|
|
* Error to throw when no username or email is set
|
|
*/
|
|
export class UsernameOrEmailNeededError extends NotFoundError {
|
|
@IsString()
|
|
name = "UsernameOrEmailNeededError"
|
|
|
|
@IsString()
|
|
message = "no username or email is set!"
|
|
}
|