Description
I have a few use cases where I want to access the response object (status code, headers, etc). For example in the global QueryClient onError callbacks, but also in specific queries.
Currently the only thing it returns is the parsed error response body, which does not allow these things. I understand that its nice developer UX to have typesafe error responses if defined in the schema, but this way im not able to get the original Response. Is there a way to do this? Any workarounds?
I have seen this #2070 (comment) originated from #2935, would work as a "hack" for invidiual queries but not globally.
If this is something we can explore, im also willing to try and create a PR for this!
Description
I have a few use cases where I want to access the response object (status code, headers, etc). For example in the global QueryClient onError callbacks, but also in specific queries.
Currently the only thing it returns is the parsed error response body, which does not allow these things. I understand that its nice developer UX to have typesafe error responses if defined in the schema, but this way im not able to get the original Response. Is there a way to do this? Any workarounds?
I have seen this #2070 (comment) originated from #2935, would work as a "hack" for invidiual queries but not globally.
If this is something we can explore, im also willing to try and create a PR for this!