1

I am new to RTK queries, and I like to work with RTK queries.

In my project, I would like to add a common error handler(middleware) also a success response handler. For error handling, I found a middleware utility from RTK query documentation. Using isRejectedWithValue we can handle the common errors. But for success API requests, I didn't find any utility.

Please let me know if anyone has more context on this.

Thanks in Advance.

Anji
  • 689
  • 1
  • 5
  • 24

1 Answers1

-1

I believe that isFulfilled is what you are looking for https://redux-toolkit.js.org/api/matching-utilities#isfulfilled

Eugene Tusmenko
  • 836
  • 4
  • 11