Am I stupid or what

Am I stupid or what? const { data, error } = useList<ApiData, HttpError>({...}) - type of error is HttpError. const { data, error } = useOne<ApiData, HttpError>({...}) - type of error is unknown. why?
kapa.ai
kapa.ai329d ago
Hi @batuhanw. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: Sorry @batuhanw, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist: Perhaps try again in 15mins?
grumpy-cyan
grumpy-cyan329d ago
Hi @kikap_ , nice catch! You may have found a bug with refine, coul you create an issue on GitHub so we can investigate and work on it? And if you want to make a contribution, I think issue is originated from here, it seems it's overlooked, we aren't passing TError to QueryObserverResult generic type: https://github.com/refinedev/refine/blob/ceadcd29fc9e42c875a4b0a78622e9fc14b4ce42/packages/core/src/hooks/data/useOne.ts#L109 It works for useList because we are correctly passing this param to QueryObserverResult here https://github.com/refinedev/refine/blob/ceadcd29fc9e42c875a4b0a78622e9fc14b4ce42/packages/core/src/hooks/data/useList.ts#L145