Skip to content

Fix errors becoming traps in wasi-http#8272

Merged
elliottt merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:no-trap-on-error
Apr 4, 2024
Merged

Fix errors becoming traps in wasi-http#8272
elliottt merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:no-trap-on-error

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit fixes an issue with errors in the wasmtime-wasi-http crate by using the trappable_error_type bindgen configuration option in the same manner as other WASI interfaces in the wasmtime-wasi crate. Unfortunately due to coherence the TrappableError<T> type itself could not be used but it was small enough it wasn't much effort to duplicate.

Closes #8269

This commit fixes an issue with errors in the `wasmtime-wasi-http` crate
by using the `trappable_error_type` bindgen configuration option in the
same manner as other WASI interfaces in the `wasmtime-wasi` crate.
Unfortunately due to coherence the `TrappableError<T>` type itself could
not be used but it was small enough it wasn't much effort to duplicate.

Closes bytecodealliance#8269
@alexcrichton alexcrichton requested a review from a team as a code owner March 31, 2024 20:39
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team March 31, 2024 20:39
@fitzgen fitzgen requested review from elliottt and removed request for fitzgen April 1, 2024 16:03
@fitzgen
Copy link
Copy Markdown
Member

fitzgen commented Apr 1, 2024

Redirecting to @elliottt

Copy link
Copy Markdown
Member

@elliottt elliottt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@elliottt elliottt added this pull request to the merge queue Apr 4, 2024
Merged via the queue into bytecodealliance:main with commit 1e14871 Apr 4, 2024
@alexcrichton alexcrichton deleted the no-trap-on-error branch April 13, 2024 03:20
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.

wasi::http::outgoing_handler::handle crashes wasmtime instead of returning an error

3 participants