wasi-messaging icon indicating copy to clipboard operation
wasi-messaging copied to clipboard

Consider using `wasi:io/error/error` instead of a custom error resource

Open fibonacci1729 opened this issue 1 year ago • 2 comments

As a bit of early implementation feedback, i found that implementing the host side of things for wasi:messaging/messaging-types/error imposed a bit of a hurdle/challenge.

How would everyone feel to replace the custom error resource defined in this package with wasi:io/error/error.

Alternatively, to make host-side implementations easier to wrangle, i'd suggest isolating out the error type into its own interface (similar to wasi:ios error) which would minimize the host code required.

Wdyt?

fibonacci1729 avatar May 16 '24 21:05 fibonacci1729

I would definitely prefer its own interface if possible in the options you presented, but I am also rather partial to errors being represented as enums rather than opaque resources. Was thinking about changing that as part of an upcoming PR to integrate some feedback from people

thomastaylor312 avatar May 20 '24 21:05 thomastaylor312

Heads up @fibonacci1729 that I added error as a variant in #23

thomastaylor312 avatar May 22 '24 20:05 thomastaylor312