DEV Community

Dera Okeke
Dera Okeke

Posted on

1

Found Solution to a Bug

Hey, all.

I had been working on a little frontend project of mine for sometime now and i ran into an issue that took me a couple of days to figure out.

For some reason, the API request was returning an empty data object when called with Axios or fetch API but was working fine and returning the expected data on postman.

After all said and done, i decided to try other browsers( Safari and Chrome) and the requests returned the data as expected. Did some digging and i believe the issue had something to do with CORS(not sure how or why, but yeah lol).

That's all for now guys. We live to solve another bug.

PS: I use Brave as my default development browser

Top comments (0)

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video