feat(dx): add default message for missing handler#264
Merged
tschneidereit merged 4 commits intobytecodealliance:mainfrom Aug 18, 2025
Merged
Conversation
This commit adds a default message for the HTTP handler to the 500 that is returned when the event loop has run but the request is still not being responded to via the fetch-event integration. In these cases, the user would normally receive a 500 with no information on what went wrong (e.g. if run with `wasmtime serve`), so with this PR we can do a little more to point towards the issue.
bcea009 to
f96f08c
Compare
andreiltd
reviewed
Aug 18, 2025
Member
tschneidereit
left a comment
There was a problem hiding this comment.
I agree that this is a good thing to do. Implementation-wise, see my inline request.
Also, we used to have build-time validation for whether a handler was registered. Or rather, Fastly's js-compute-runtime did: see the commented code here. I don't entirely remember why I disabled it, but in any case, restoring this validation would be fantastic.
tschneidereit
approved these changes
Aug 18, 2025
Member
tschneidereit
left a comment
There was a problem hiding this comment.
LGTM with the suggestion applied
Co-authored-by: Till Schneidereit <till@tillschneidereit.net>
Member
|
Thank you! |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds a default message for the HTTP handler to the 500 that is returned when the event loop has run but the request is still not being responded to via the fetch-event integration.
In these cases, the user would normally receive a 500 with no information on what went wrong (e.g. if run with
wasmtime serve), so with this PR we can do a little more to point towards the issue.