schema generator error type doc

This commit is contained in:
Igor Loskutov
2025-09-03 09:04:40 -04:00
parent 1b22eabb3f
commit 611e258d96
4 changed files with 20 additions and 12 deletions

View File

@@ -29,6 +29,7 @@ const AuthContext = createContext<AuthContextType | undefined>(undefined);
export function AuthProvider({ children }: { children: React.ReactNode }) {
const { data: session, status, update } = useNextAuthSession();
const customSession = session ? assertExtendedTokenAndUserId(session) : null;
console.log("customSessioncustomSession", customSession);
const contextValue: AuthContextType = {
...(status === "loading" && !customSession

View File

@@ -3,9 +3,15 @@
import { $api } from "./apiClient";
import { useError } from "../(errors)/errorContext";
import { useQueryClient } from "@tanstack/react-query";
import type { components, paths } from "../reflector-api";
import type { components } from "../reflector-api";
import { useAuth } from "./AuthProvider";
/*
* XXX error types returned from the hooks are not always correct; declared types are ValidationError but real type could be string or any other
* this is either a limitation or incorrect usage of Python json schema generator
* or, limitation or incorrect usage of .d type generator from json schema
* */
const useAuthReady = () => {
const auth = useAuth();