Stream: git-wasmtime

Topic: wasmtime / PR #14432 serve: answer 400, not 500, for a re...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 15:29):

xia-chao requested dicej for a review on PR #14432.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 15:29):

xia-chao requested wasmtime-wasi-reviewers for a review on PR #14432.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 15:29):

xia-chao updated PR #14432.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 15:29):

xia-chao edited PR #14432.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 15:29):

xia-chao edited PR #14432:

wasmtime serve answers 500 when a request has neither a URI authority nor a
Host header. The rejection happens before the guest runs, so the error now
carries the status the client should see, and serve reads it back, defaulting
to 500. That gives the 400 RFC 9112 section 3.2 asks for, and it is not
version-specific: an HTTP/1.0 request without Host gets the same 400.
wasi:http/service is untouched.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 15:32):

xia-chao commented on PR #14432:

Your three steps are merged, but they don't actually solve the problem: the p2 prepare error gets wrapped into a TrapOrPanicError before serve gets it, so ErrorResponse is only logged and we still return a 500.

To get a 400, we should pass this error back through tx just like instantiation errors do. This touches 6 test cases, but leaves service completely unchanged.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 15:37):

xia-chao commented on PR #14432:

Done in fdf05d286b. Passing the error back through tx gives us the 400 now; my earlier comment was describing the code before this fix.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 15:37):

xia-chao edited a comment on PR #14432:

Done in fdf05d286b. Passing the error back through tx gives us the 400 now;

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:memo: pchickey submitted PR review:

Thanks very much for the changes. This round of feedback is mostly that Claude is awfully verbose with comments (you pay by the token, after all) and I think that all of the really obvious ones are best deleted.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:speech_balloon: pchickey created PR review comment:

Delete comment

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:speech_balloon: pchickey created PR review comment:

Delete comment

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:speech_balloon: pchickey created PR review comment:

This comment only needs to be "A response that should be returned to the client when a request cannot be turned into a guest request."

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:speech_balloon: pchickey created PR review comment:

Just "- [ErrorResponse](crate::ErrorResponse) if the request could not be converted into a guest request."

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:speech_balloon: pchickey created PR review comment:

Delete second sentence of this comment.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:speech_balloon: pchickey created PR review comment:

use wasmtime::bail! with this message

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:speech_balloon: pchickey created PR review comment:

Delete comment

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:speech_balloon: pchickey created PR review comment:

Delete comment

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 22:09):

:speech_balloon: pchickey created PR review comment:

Delete comment

view this post on Zulip Wasmtime GitHub notifications bot (Oct 02 2026 at 19:37):

xia-chao updated PR #14432.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 02 2026 at 19:43):

xia-chao commented on PR #14432:

Done

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 17:43):

:thumbs_up: pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 17:44):

pchickey commented on PR #14432:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 17:44):

pchickey added PR #14432 serve: answer 400, not 500, for a request with no authority or Host header to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 18:07):

:check: pchickey merged PR #14432.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 18:07):

pchickey removed PR #14432 serve: answer 400, not 500, for a request with no authority or Host header from the merge queue.


Last updated: Oct 11 2026 at 04:10 UTC