WebAssembly / WebAssembly/WASI

Figure out the right set of cases in `error`

Open
#824 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-http S-inactive
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

Spinning out from this comment, we should discuss what the right set of variant cases are for error. Ideally, we'd be able to align with something in the HTTP spec, but I'm not sure what that is (noting that the well-defined status codes are already in a separate status-code field in responses).

As a general principle, I think it's a good idea to have separate cases only when code might want to actually branch and handle the different cases differently; to convey extra information for debugging purposes we can use the case payloads (e.g., with a string).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the discussion linked from the issue and the error definition in wit/types.wit at lines 32-37. Compare the possible variant cases with the HTTP specification and the existing separate status-code field. Done means reaching agreement on the right cases and any payloads needed for debugging.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.