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

[🐞] Throwing a ServerError only works with production builds and not during dev #7165

Open
DustinJSilk opened this issue Dec 15, 2024 · 0 comments
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@DustinJSilk
Copy link
Contributor

Which component is affected?

Qwik Rollup / Vite plugin

Describe the bug

Throwing a ServerError from a server$ function only uses the correct status code in production builds, not during development.

The issue seems to be that vite copies the ServerError class, so when Qwik checks if it is a server error with err instanceof ServerError, the thrown instance is different to the class it is compared with. I could be wrong but this is what it looks like.

Reproduction

N/A

Steps to reproduce

No response

System Info

N/A

Additional Information

No response

@DustinJSilk DustinJSilk added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant