skip to Main Content

Reactjs – 'react-query' – useMutation fire onSuccess while should fire OnError

I have issue with error response from axios client to my useMutation. axios client import axios from "axios"; const client = axios.create({ baseURL: `${process.env.REACT_APP_API_HOST}/${process.env.REACT_APP_API_PREFIX}` }); export const request = ({...options}) => { client.defaults.headers.common.Authorization = `Bearer ${JSON.parse(localStorage.getItem('userDetails')).idToken}` client.defaults.headers.common['Content-Type'] = 'application/json'; const…

VIEW QUESTION
Back To Top
Search