-
Notifications
You must be signed in to change notification settings - Fork 55
HTTP Status Codes
michael-mcgrail-rackspace edited this page Oct 10, 2013
·
14 revisions
AH will return the appropriate HTTP Status Codes based on the request.
Based on the Atom Publishing Protocol, RFC 5023 and the HTTP specification, RFC 2616
The Atom Protocol uses the response status codes defined in HTTP to indicate the success or failure of an operation. Consult the HTTP specification RFC2616 for detailed definitions of each status code. Implementers are asked to note that according to the HTTP specification, HTTP 4xx and 5xx response entities SHOULD include a human-readable explanation of the error.
The following codes may be returned by Atom Hopper:
Code Category | Code | Code Description | Example Request | Example Response | Notes |
---|---|---|---|---|---|
Successful | 200 | OK | GET to Collection URI. | 200 + Atom Feed Document | |
Successful | 200 | OK | GET to Member URI. | 200 + Member Representation | |
Successful | 201 | Created | POST to Collection URI with Member Representation. | Location: Member Entry URI | |
Client Error | 405 | Method Not Allowed | Valid response. A PUT or DELETE trigger possibly. | ||
Client Error | 422 | Typically this error occurs when malformed Atom XML is passed to Atom Hopper. It can also occur when no Atom XML was passed in. | Valid response. Syntax errors in body may trigger this. | ||
Server Error | 500 | Internal Server Error | POST while database is offline. | This is returned for the network failure scenario - if the database server is rebooted, Atom Hopper will return a 500 until the database is ready again. When the database comes online, Atom Hopper begins to save entries again. |
Note: POST with malformed request could be 400 or 422. AtomServer uses the following codes:
- 400 BAD REQUEST Invalid request URI or header, or unsupported nonstandard parameter.
- 422 BAD CONTENT The Entry is not valid