|
3 | 3 | /// their headers, trailers, and bodies.
|
4 | 4 | interface types {
|
5 | 5 | use wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10.{duration};
|
6 |
| - use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream, output-stream, error as stream-error}; |
| 6 | + use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream, output-stream}; |
| 7 | + use wasi:io/error@0.2.0-rc-2023-11-10.{error as io-error}; |
7 | 8 | use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
|
8 | 9 |
|
9 | 10 | /// This type corresponds to HTTP standard Methods.
|
@@ -94,17 +95,18 @@ interface types {
|
94 | 95 | field-size: option<u32>
|
95 | 96 | }
|
96 | 97 |
|
97 |
| - /// Attempts to extract a http-related `error` from the stream `error` |
| 98 | + /// Attempts to extract a http-related `error` from the wasi:io `error` |
98 | 99 | /// provided.
|
99 | 100 | ///
|
100 |
| - /// Stream operations which return `stream-error::last-operation-failed` have |
101 |
| - /// a payload with more information about the operation that failed. This |
102 |
| - /// payload can be passed through to this function to see if there's |
103 |
| - /// http-related information about the error to return. |
| 101 | + /// Stream operations which return |
| 102 | + /// `wasi:io/stream/stream-error::last-operation-failed` have a payload of |
| 103 | + /// type `wasi:io/error/error` with more information about the operation |
| 104 | + /// that failed. This payload can be passed through to this function to see |
| 105 | + /// if there's http-related information about the error to return. |
104 | 106 | ///
|
105 |
| - /// Note that this function is fallible because not all stream-related errors |
106 |
| - /// are http-related errors. |
107 |
| - http-error-code: func(err: borrow<stream-error>) -> option<error-code>; |
| 107 | + /// Note that this function is fallible because not all io-errors are |
| 108 | + /// http-related errors. |
| 109 | + http-error-code: func(err: borrow<io-error>) -> option<error-code>; |
108 | 110 |
|
109 | 111 | /// This type enumerates the different kinds of errors that may occur when
|
110 | 112 | /// setting or appending to a `fields` resource.
|
|
0 commit comments