Error Handling with Fetch works but isError always returns False
So I am using NextJS with page router, and in my code, I have an API that can return either a status 200 with the data or several other status codes (404, 403, and 500) depending on access permissions.
Following the docs, I wrote my react query function as follows:
and my I access this function on my
I'm finding that the error shows up from getPlanFn, but isError is always FALSE (please see photo for reference). Why might that be happening?
I would appreciate the help on this because I've been struggling for the past 2 hours, trying to figure out what is wrong.
Following the docs, I wrote my react query function as follows:
and my I access this function on my
[plan].tsx page as such:I'm finding that the error shows up from getPlanFn, but isError is always FALSE (please see photo for reference). Why might that be happening?
I would appreciate the help on this because I've been struggling for the past 2 hours, trying to figure out what is wrong.
