TanStackT
TanStack3y ago
2 replies
faint-white

Is error resolved with `onError` callback?

Hello

Is the error resolved on the onError callback or do I need to await and parse it?

onError: async (error: Response) => {
        const response = await error.json();
        logErrorToSentry(response);
      },

or like this
onError: async (error: Response) => {
        logErrorToSentry(error);
      },
Was this page helpful?