We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there any guide on how to handle errors, e.g. 500, on the server side? I still can't figure out how to do it with this plugin:
export default viteSSR(App, { routes }, ({ url, app, router, initialState, request, isClient, writeResponse, redirect }) => { const head = createHead() app.use(head) app.config.errorHandler = (err, vm, info) => { const statusCode = err.statusCode ? err.statusCode : 500 // Reload browser so that the error is handled on SSR instead. if (isClient) { location.reload() } if (import.meta.env.SSR) { writeResponse({ status: statusCode, html: err.message // how can we pass the app html here? }) } } return { head } } )
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there any guide on how to handle errors, e.g. 500, on the server side? I still can't figure out how to do it with this plugin:
Thanks!
The text was updated successfully, but these errors were encountered: