Skip to content

Conversation

@namse
Copy link

@namse namse commented Dec 29, 2025

Currently, WasiHttpView::new_incoming_request enforces that the request body's error type must be exactly hyper::Error. This limits flexibility for implementations that might use a custom body type with a different error type that is still compatible with WASI HTTP errors.

This PR relaxes the trait bound on B::Error from strict hyper::Error to Into<ErrorCode>. To support this, a From<hyper::Error> implementation for ErrorCode has been added. This allows new_incoming_request to accept any body whose errors can be converted into an ErrorCode, making the API more generic and reusable.

@namse namse requested a review from a team as a code owner December 29, 2025 04:19
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

Successfully merging this pull request may close these issues.

1 participant