You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an error (500 status for example) fires in the backend, the error handler issues Inertia::render('Error', []) to show the message.
Now, if I'm doing a axios call, how do I render/load that Error.vue page from the vue component that made said axios call ? Is it possible ?
I know I could make an server route to navigate to an error page, but that doesn't sound too good. I already got the response from the server, sending that message back to the backend again so I can show with Error.vue looks bad.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've setup the Error page similar to what is shown in https://inertiajs.com/error-handling (Laravel option)
When an error (500 status for example) fires in the backend, the error handler issues Inertia::render('Error', []) to show the message.
Now, if I'm doing a axios call, how do I render/load that Error.vue page from the vue component that made said axios call ? Is it possible ?
I know I could make an server route to navigate to an error page, but that doesn't sound too good. I already got the response from the server, sending that message back to the backend again so I can show with Error.vue looks bad.
Beta Was this translation helpful? Give feedback.
All reactions