-
-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Production mode #15
Comments
I think it's related with #13, probably. |
To do that, the user should be able to detect the error in the layout component (for example), and load an "error" component. But, the client side has to be able to detect this error. |
Hey @cmizzi! Are you suggesting that Inertia shouldn't show modals for errors in production? I think that's really up to the developer, and not something this adapter has to worry about. That way I'd personally handle this is by updating my Laravel exception handler to return a proper Inertia response in the event of a server-side error. Doing that you can avoid showing the modal. I've actually tested this, and created an No matter what, I think it's important that Inertia does something logical when it receives a non-Inertia response. For example, that could be caused by something entirely outside of Laravel. For example, maybe your DNS service or hosting provider shows some type of error page before it even hits your app. The modal is a great solution in those situations. |
There's no production mode. To make it, we can't show error response into a modal. But, I don't really know if Laravel has to handle this case, or if Inertia should.
When an error occurred during navigation (using
X-Inertia
header), the modal is shown containing the error content (debug purpose), but never touches the vue component. I don't know how to manage the case. What a production mode need ? Not only the dev console to store the exception, but also a client feedback. I really don't know if this job should be done by Laravel, Inertia or various wrappers (inertia-vue
, etc.).A Laravel response will simply validate the error URL by loading an error component on it, I don't think it's the best way to manage that because if we want create a modal, we can't. Inertia cannot really do that, because it doesn't interact with the client directly but through the wrapper, but the wrapper cannot do the job because it is never informed about an axios error.
P.S: Sorry if the issue is confused, my head is about this thing 😄
The text was updated successfully, but these errors were encountered: