Replies: 1 comment
-
@igmtdev I faced this same issue recently. Here is how you can solved it: // type
type ResponseType = InferResponseType<(typeof client.api.auth)['update-profile']['$post'], 200>; // mutationFn
async ({ json }) => {
const response = await client.api.auth['update-profile'].$post({ json });
const resp = await response.json();
if ('error' in resp) {
throw new Error(resp.error);
}
return resp;
} This is not a concrete solution, just a hack. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying to get the "return success" and "return error", but what I've got is this "type ResponseType = {}" or "type ResponseType = any"
Beta Was this translation helpful? Give feedback.
All reactions