[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Should a response body for errors be standardized?
How should errors be handled? That is, an HTTP Status code needs to be returned when an operation fails. Should there be a response body on errors, and if so, what should it look like? I see three possibities, if you have other ideas please add to this list:
1. Don't specify a format for the response body, let the server decide the format of what to return.
2. Specify a mimi-type of the text/plain, so the error string can be presented to the user.
3. Return and XML file with formatted error info:
<error>
<title>Can't create Entry</title>
<description>Your bloggging service subscription has expired.
Visit reup.example.com to renew your subscription today!</description>
</error>
Thanks,
-joe
--
http://BitWorking.org
http://WellFormedWeb.org