diff options
author | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-03-03 16:26:59 -0600 |
---|---|---|
committer | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-03-03 16:26:59 -0600 |
commit | e892d20e18a5a7002071f7ec0468437227e508a7 (patch) | |
tree | 21359d49dffdfa9cd71067ef919f41e1c8e053ff /docs | |
parent | a9634b9aea64eb4e00c497e72814f6bd9c237556 (diff) | |
download | bbj-e892d20e18a5a7002071f7ec0468437227e508a7.tar.gz |
primitive message editing support; new sanity checks
Diffstat (limited to 'docs')
-rw-r--r-- | docs/protocol.org | 82 |
1 files changed, 44 insertions, 38 deletions
diff --git a/docs/protocol.org b/docs/protocol.org index 161de62..1a4a319 100644 --- a/docs/protocol.org +++ b/docs/protocol.org @@ -143,41 +143,47 @@ the problem. `description` is intended for human consumption; in your client code, use the error codes to handle conditions. The `presentable` column indicates whether the `description` should be shown to users verbatim. -| Code | Presentable | Documentation | -|------|--------------|---------------------------------------------------| -| 0 | Never, fix | Malformed json input. `description` is the error | -| | your client | string thrown by the server-side json decoder. | -|------|--------------|---------------------------------------------------| -| 1 | Not a good | Internal server error. Unaltered exception text | -| | idea, the | is returned as `description`. This shouldn't | -| | exceptions | happen, and if it does, make a bug report. | -| | are not | clients should not attempt to intelligently | -| | helpful | recover from any errors of this class. | -|------|--------------|---------------------------------------------------| -| 2 | Nadda. | Unknown `method` was requested. | -|------|--------------|---------------------------------------------------| -| 3 | Fix. Your. | Missing or malformed parameter values for the | -| | Client. | requested `method`. | -|------|--------------|---------------------------------------------------| -| 4 | Only during | Invalid or unprovided `user`. | -| | registration | | -| | | During registration, this code is returned with a | -| | | `description` that should be shown to the user. | -| | | It could indicate an invalid name input, an | -| | | occupied username, invalid/missing `auth_hash`, | -| | | etc. | -|------|--------------|---------------------------------------------------| -| 5 | Always | `user` is not registered. | -|------|--------------|---------------------------------------------------| -| 6 | Always | User `auth_hash` failed or was not provided. | -|------|--------------|---------------------------------------------------| -| 7 | Always | Requested thread does not exist. | -|------|--------------|---------------------------------------------------| -| 8 | Always | Requested thread does not allow posts. | -|------|--------------|---------------------------------------------------| -| 9 | Always | Message edit failed; there is a 24hr limit for | -| | | editing posts. | -|------|--------------|---------------------------------------------------| -| 10 | Always | User action requires `admin` privilege. | -|------|--------------|---------------------------------------------------| -| 11 | Always | Invalid formatting directives in text submission. | +| Code | Presentable | Documentation | +|------+--------------+----------------------------------------------------| +| 0 | Never, fix | Malformed json input. `description` is the error | +| | your client | string thrown by the server-side json decoder. | +|------+--------------+----------------------------------------------------| +| 1 | Not a good | Internal server error. Unaltered exception text | +| | idea, the | is returned as `description`. This shouldn't | +| | exceptions | happen, and if it does, make a bug report. | +| | are not | clients should not attempt to intelligently | +| | helpful | recover from any errors of this class. | +|------+--------------+----------------------------------------------------| +| 2 | Nadda. | Unknown `method` was requested. | +|------+--------------+----------------------------------------------------| +| 3 | Fix. Your. | Missing, malformed, or otherwise incorrect | +| | Client. | parameters or values for the requested `method`. | +| | | This is returned, for example, when a request to | +| | | `edit_post` tries to edit a post_id that does | +| | | not exist. Its also used to indicate a lack of | +| | | required arguments for a method. This is a generic | +| | | error class that can cover programming errors | +| | | but never user errors. | +|------+--------------+----------------------------------------------------| +| 4 | Only during | Invalid or unprovided `user`. | +| | registration | | +| | | During registration, this code is returned with a | +| | | `description` that should be shown to the user. | +| | | It could indicate an invalid name input, an | +| | | occupied username, invalid/missing `auth_hash`, | +| | | etc. | +|------+--------------+----------------------------------------------------| +| 5 | Always | `user` is not registered. | +|------+--------------+----------------------------------------------------| +| 6 | Always | User `auth_hash` failed or was not provided. | +|------+--------------+----------------------------------------------------| +| 7 | Always | Requested thread does not exist. | +|------+--------------+----------------------------------------------------| +| 8 | Always | Requested thread does not allow posts. | +|------+--------------+----------------------------------------------------| +| 9 | Always | Message edit failed; there is a 24hr limit for | +| | | editing posts. | +|------+--------------+----------------------------------------------------| +| 10 | Always | User action requires `admin` privilege. | +|------+--------------+----------------------------------------------------| +| 11 | Always | Invalid formatting directives in text submission. | |