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

Add `http-response-status-invalid` error code

Open acfoltzer opened this issue 1 year ago • 4 comments

I failed to notice this was missing in #52. Status codes outside the range of 100-599 are invalid, though there is a nod to implementation-defined behavior outside those valid ranges. In practice we have found it very useful to return error codes specific to status problems to customers since our platform does not support codes outside this range, and the next-best option in the RFC 9209 equivalents is the generic http-protocol-error which doesn't help a user much with debugging.

acfoltzer avatar Feb 21 '24 19:02 acfoltzer

We may not be able to accept this change before 0.3.0 - AFAIK, we are scaling back all of our subtyping aspirations to where just adding new functions to interfaces is permitted, and not changing any of the types defined in those interfaces.

pchickey avatar Feb 21 '24 21:02 pchickey

Aha, that makes sense. I'm fine with putting this on ice then or changing the base revision to #101 if that's the best way to start accumulating breaking changes?

acfoltzer avatar Feb 22 '24 17:02 acfoltzer

I guess in this repo we'll be working on 0.3.0-draft in parallel with 0.2.x-draft, so maybe landing #101 underneath a subdir (0.3.0-draft/?) and then we can keep iterating on both in main? @dicej @lukewagner wdyt?

pchickey avatar Feb 23 '24 02:02 pchickey

I like the idea of subdirs with versions as names; this matches what I expect we'll be doing as we release new official minor versions in the main wasi GH repo.

lukewagner avatar Feb 23 '24 15:02 lukewagner