Apr 19, 2024
0
Level 1
Inertia: Gracefully handling "AxiosError: Network Error"
I'm encountering an intermittent "AxiosError: Network Error" in Sentry, predominantly with users likely having poor internet connections. The error surfaces when using the router function in Inertia to manage routing. Some example code:
Note: using Ziggy.js
router.visit(
route('manual.show', {
manual: manualData.slug,
topic: selectedTopic.id,
section: nestedSection.id
}),
{
only: ['topic', 'section'],
}
)
Given the symptoms and the very low rate it happens, I suspect the issue might be related to network timeouts. Is there a recommended approach in Inertia to handle or gracefully recover from such timeouts? I'm using Inertia version 1.0.15
Please or to participate in this conversation.