Skip to content
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

Expose ssrFixStacktrace to application #188

Open
cendyne opened this issue Oct 13, 2024 · 0 comments
Open

Expose ssrFixStacktrace to application #188

cendyne opened this issue Oct 13, 2024 · 0 comments

Comments

@cendyne
Copy link

cendyne commented Oct 13, 2024

When an application uses an onError handler, the stack trace lines are incorrect. This is typically remedied with vite.ssrFixStacktrace, however as the vite server (https://github.com/honojs/vite-plugins/blob/main/packages/dev-server/src/dev-server.ts#L67) is not passed through the environment or context, it seems unreachable within an application hono handler.

If I throw it again from the onError handler, the vite dev server picks it up and gives an error response with the correct line numbers, suggesting that ssrFixStacktrace works when applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant