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)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay