public commit

This commit is contained in:
dswbx
2024-11-16 12:01:47 +01:00
commit 90f80c4280
582 changed files with 49291 additions and 0 deletions

28
app/src/auth/errors.ts Normal file
View 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");
}
}