DEV Community

Dera Okeke
Dera Okeke

Posted on

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)