-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix: provide a proper error message when using getCloudflareContext
in static routes
#330
Conversation
… in static routes
🦋 Changeset detectedLatest commit: c93380e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there be a way to test this? (i.e. launch next build
and check the errors`)
I was thinking the same too, I don't think this could be tested using our e2es/playwright, so testing this would require a new type of test, a sort of semi-e2e one in which we run the build command and test the result, that's totally doable I think, but not trivial (but also probably not super complex) which would also increase maintenance costs. I am not sure if it's worth it (especially for just testing these error messages), but if you think it is I'm happy to work on it (potentially in a followup PR as there are other things that we could test in such a way, like the messages we present to the users during build) just let me know can I can work on it 👍 |
Thanks, a follow up PR sounds great, can you create an issue? |
#331 🙂👍 (PS: again I'm not sure how we want to prioritize this, if you want me to work on it, I'm happy to work on it whenever) |
getCloudflareContext
can't be used in static routes, currently a misleading errormessage incorrectly tells the developer that they haven't called
initOpenNextCloudflareForDev
in their config file, this change updates such error message to properly clarify what
the issue is (and how to solve it)
fixes #317