mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
29 lines
598 B
TypeScript
29 lines
598 B
TypeScript
import { Exception } from "core";
|
|
|
|
export class UserExistsException extends Exception {
|
|
override name = "UserExistsException";
|
|
override code = 422;
|
|
|
|
constructor() {
|
|
super("User already exists");
|
|
}
|
|
}
|
|
|
|
export class UserNotFoundException extends Exception {
|
|
override name = "UserNotFoundException";
|
|
override code = 404;
|
|
|
|
constructor() {
|
|
super("User not found");
|
|
}
|
|
}
|
|
|
|
export class InvalidCredentialsException extends Exception {
|
|
override name = "InvalidCredentialsException";
|
|
override code = 401;
|
|
|
|
constructor() {
|
|
super("Invalid credentials");
|
|
}
|
|
}
|