mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
public commit
This commit is contained in:
28
app/src/auth/errors.ts
Normal file
28
app/src/auth/errors.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user