Re: [xwiki-devs] [xwiki-notifications] [Issue] Created: (XWIKI-4089) More significant HTTP status codes for error responses
On Jul 14, 2009, at 11:06 PM, Sergiu Dumitriu (JIRA) wrote:
More significant HTTP status codes for error responses ------------------------------------------------------
Key: XWIKI-4089 URL: http://jira.xwiki.org/jira/browse/XWIKI-4089 Project: XWiki Core Issue Type: Improvement Components: Actions and URLs Affects Versions: 2.0 M1 Reporter: Sergiu Dumitriu
Several error messages come with the default 200 HTTP status code, indicating success, although the request did not complete normally. Besides adding more semantics, this is also more friendly with services and AJAX calls.
- access denied -> 403 Forbidden - document locked -> 423 Locked - invalid action on non-existing document -> 404 Not Found - invalid action on wrong document -> 400 Bad Request - invalid target for copy and rename -> 409 Conflict - template does not exist -> 400 Bad Request
Won't we get default browser error pages instead of our own error pages? Thanks -Vincent
Vincent Massol wrote:
On Jul 14, 2009, at 11:06 PM, Sergiu Dumitriu (JIRA) wrote:
More significant HTTP status codes for error responses ------------------------------------------------------
Key: XWIKI-4089 URL: http://jira.xwiki.org/jira/browse/XWIKI-4089 Project: XWiki Core Issue Type: Improvement Components: Actions and URLs Affects Versions: 2.0 M1 Reporter: Sergiu Dumitriu
Several error messages come with the default 200 HTTP status code, indicating success, although the request did not complete normally. Besides adding more semantics, this is also more friendly with services and AJAX calls.
- access denied -> 403 Forbidden - document locked -> 423 Locked - invalid action on non-existing document -> 404 Not Found - invalid action on wrong document -> 400 Bad Request - invalid target for copy and rename -> 409 Conflict - template does not exist -> 400 Bad Request
Won't we get default browser error pages instead of our own error pages?
No, unless there's no content. This is how custom error pages work, too, and I've seen lots of those. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (2)
-
Sergiu Dumitriu -
Vincent Massol