aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Sampson <adrian@radbox.org>2013-01-19 21:22:24 -0800
committerAdrian Sampson <adrian@radbox.org>2013-01-19 21:22:24 -0800
commit7dabc59becd2b3dc38c4c20ed01ea3482b29cdbf (patch)
treeb1a5f24bbf56b6d178ddbf4a00c056a00ebe8518
parentsimple clarity/organization edits (diff)
downloadramc-spec-7dabc59becd2b3dc38c4c20ed01ea3482b29cdbf.tar.xz
ramc-spec-7dabc59becd2b3dc38c4c20ed01ea3482b29cdbf.zip
error handling
-rw-r--r--spec.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec.md b/spec.md
index 4b032f5..6b15e7a 100644
--- a/spec.md
+++ b/spec.md
@@ -524,5 +524,13 @@ The following table includes coordinated extensions and mimetypes. Preferred ext
</tbody>
</table>
+## Errors
+
+For any successful request, the server responds with HTTP status 200 and the result dictionary must not contain the key `error`. When any server-side error occurs (malformed request, authentication error, etc.), an appropriate HTTP error status is used. The result dictionary contains the key `error`, associated with a string describing what went wrong. For example, when an invalid token in supplied to an authenticated endpoint, the server could respond with HTTP status 403 and the following body:
+
+ {
+ "error": "authentication error"
+ }
+
## License
This work is licensed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://git.zx2c4.com/ramc-spec/tree/COPYING).