Relative Content

Tag Archive for expresscorsredux-toolkitrtk-query

RTK Query Error { status: ‘FETCH_ERROR’, error: ‘TypeError: fetch failed’ } while am hitting an GET api to Fetch Blogs

I am using RTK Queries for Front-end Api Integration and Express js for Backend but while I am hitting a get api to fetch blogs post it will run fine from backend side it will return expected results from backend side but in front end it returns cors error and returns nothing in the response of the api like this one=>
image 1 displaying the error on the network tab while hitting the get api of the fetch blogs
or if I am talking about the response of the api it gives nothing in it but giving 200 status code in the api headers tab like this one=>
enter image description here
enter image description here