Skip to content
Browse files

added documentation about API errors

  • Loading branch information...
1 parent 5be8f75 commit 7c46a9df1fa3994bc112b336994663b0616909d0 @mapleoin committed Sep 21, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 popcorn/templates/api.html
View
16 popcorn/templates/api.html
@@ -51,5 +51,21 @@
h3. Errors
+Errors set the proper HTTP code and return a message stored in the @error@ field:
+
+pre. $ curl -i --header "Accept: application/json" http://popcorn.opensuse.org/NotFound
+
+pre..
+HTTP/1.0 404 NOT FOUND
+Content-Type: application/json
+Content-Length: 53
+Server: Werkzeug/0.8.3 Python/2.7.3
+Date: Fri, 21 Sep 2012 13:17:23 GMT
+
+{
+ "error": "Not Found"
+}
+
+
{% endfilter %}
{% endblock %}

0 comments on commit 7c46a9d

Please sign in to comment.
Something went wrong with that request. Please try again.