#6670·axios

Axios stack trace useless, old issue cropping up?

Author: maxiedanielsCreated Oct 28, 2024Updated Jul 7, 2026

Describe the issue

I have a frustrating issue with Axios 1.7.7 where my user's browsers are triggering generic AxiosError errors. I'm seeing these on my Sentry dashboard, and the only detail is Network Error, and the stack trace shows:

./node_modules/axios/lib/core/AxiosError.js in request.onerror at line 103:16
...
  customProps && Object.assign(axiosError, customProps);
  return axiosError;
};
export default AxiosError;

I saw this thread which seems to cover the same idea, but it was supposedly fixed a while back: https://github.com/axios/axios/issues/2387

I've included one Axios call that I can see referenced in Sentry breadcrumbs, maybe I'm doing something wrong.

Example Code

try {
        const response = await axios.get<Subscription>(`${process.env.NEXT_PUBLIC_API_URL}/get-subscription`, {
            headers: { Authorization: `Bearer ${token}` }
        })
        return response.data
    } catch (error) {
        console.error('Error fetching subscription:', error)
        Sentry.captureException(error)
        return null
    }

Expected behavior

No response

Axios Version

1.7.7

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

18.19.1

OS

No response

Additional Library Versions

No response

Additional context/Screenshots

No response