HTTP has a well-understood set of meanings that sometimes conflicts with the spec. Here we set a more clear standard that is applicable to the product
The RFC states that HTTP statuses are extensible, and e.g. any unrecognized 4xx code MUST be treated as a 400 by any client that doesn’t understand it. We could use that to our advantage, though we should tread carefully here
Status Type | Potential Causes | Suggested Message |
---|---|---|
Bad Assumption | - Race Condition | That action is no longer available; please reload and try again. If the problem persists, please check for an update |
Protocol Error |
Here are the default semantics, where applicable, of HTTP methods on resource classes. Either this happens, or one of the Implicit conditions above is rendered, and must be handled by the client.
These are assumed on every resource class, and can be overridden or left implied. The details of these responses can be left implicit too, so that documentation can be added without having to redundantly specify details
GET | 200 OK with the response type of the resource class. |
---|---|
DELETE | 204 |
POST on Collection | |
PATCH | We might not have default behavior for this, but if we do, it should be a lax version of the input type. How does this interact with the contexts idea? ‣ |