Menu

1 / 2

🐛 The Bug That Taught Me to Check the Basics

DEV Community·TheDivyaLog·7 months ago
#Ra3Ym8nT
#productivity#react#lea#webdev#error
Reading 0:00
15s threshold

Hey Dev's👋

While working on my Job Portal UI project using React, I ran into a persistent issue while fetching data from an API using Axios.

The error looked simple—but debugging it wasn’t.

* ⚠️ The Problem

*

Every time I tried to fetch data, I got:

AxiosError: Network Error

net::ERR_INTERNET_DISCONNECTED

TypeError: Failed to fetch

At first glance, it seemed like a connectivity issue—but the API endpoint was opening fine in the browser

🔍 What I Checked

Instead of assuming one cause, I started verifying basics step by step:

✔️ API endpoint working in browser

✔️ Correct Axios request syntax

✔️ Proper component rendering in React

✔️ Dev server running correctly

✔️ Console logs for deeper inspection

🤔 What I Realized

This experience made me slow down and stop guessing.

Even if an error message looks obvious, it can sometimes be misleading or caused by multiple factors like:

Network instability

CORS issues

Incorrect API usage

Environment/config problems

🧠 The Lesson

What this bug is…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.