auth fix?
CI/CD Pipeline / Build and Push App Docker Image (push) Successful in 2m55s
CI/CD Pipeline / Build and Push PocketBase Docker Image (push) Successful in 8s
CI/CD Pipeline / Deploy to Kubernetes (push) Failing after 2m36s

This commit is contained in:
yohlo
2026-07-11 13:11:45 -07:00
parent e67f6b073c
commit ec334bbed4
6 changed files with 32 additions and 15 deletions
+3 -7
View File
@@ -1,5 +1,6 @@
import { setUserMetadata, superTokensFunctionMiddleware, getSessionContext } from "@/utils/supertokens";
import { createServerFn } from "@tanstack/react-start";
import { isRedirect } from "@tanstack/react-router";
import { Player, playerInputSchema, playerUpdateSchema, PlayerStats } from "@/features/players/types";
import { Match } from "@/features/matches/types";
import { pbAdmin } from "@/lib/pocketbase/client";
@@ -26,13 +27,8 @@ export const fetchMe = createServerFn()
phone: context.phone
};
} catch (error: any) {
// logger.info("FetchMe: Session error", error)
if (error?.response?.status === 401) {
const errorData = error?.response?.data;
if (errorData?.error === "SESSION_REFRESH_REQUIRED") {
throw error;
}
}
if (isRedirect(error) || error instanceof Response) throw error;
return { user: undefined, roles: [], metadata: {}, phone: undefined };
}
})