RTK Query: Specifying error type per endpoint

Issue

Is there a way to specify error response per endpoint? Like we can specify Result & Request type when defining a query or mutation. I did went through the documentation and updated the base query. I am getting the generic success/error response types but still trying to figure out how to define error type per endpoint.

Solution

As per our GitHub Discussion (which might be insightful for others with the same question): not at the moment.

Answered By – phry

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published