refacto: errors in apis

This commit is contained in:
Julien Froidefond
2025-02-25 08:40:06 +01:00
parent bf6fa0a71d
commit a690a5af6f
29 changed files with 720 additions and 109 deletions

View File

@@ -1,4 +1,5 @@
import { KomgaUser } from "./komga";
import { ErrorCode } from "@/constants/errorCodes";
export interface AuthConfig {
serverUrl: string;
@@ -12,8 +13,9 @@ export interface AuthState {
}
export interface AuthError {
code: AuthErrorCode;
code: ErrorCode;
message: string;
}
export type AuthErrorCode = "INVALID_CREDENTIALS" | "SERVER_ERROR" | "EMAIL_EXISTS";
// Deprecated - Use ErrorCode from @/constants/errorCodes instead
export type AuthErrorCode = ErrorCode;