OperationResult.BadRequest, 4XX responses and error collections

0 views
Skip to first unread message

paulcampbell_

unread,
Oct 25, 2011, 7:04:00 AM10/25/11
to OpenWrap Development Mailing List
Hi Guys,

When returning a BadRequest from a handler, OpenRasta does not expose
the Errors property in the response. I believe the fact that the
BadRequest exposes this property (on the object) can be a little
misleading to the developer - I was a little surprised when the errors
collection never cropped up in the response (in my consuming app).

Furthermore (and perhaps more important) I think that errors should be
returned by 4xx errors.

" Except when responding to a HEAD request, the server should include
an entity containing an explanation of the error situation, and
whether it is a temporary or permanent condition."

http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error

Whilst I accept it is possible to push some sort of error object into
the .ResponseResource (and perhaps this is the correct thing to do?)
It seems like making use of the existing error property may be a
better way to go?

I am happy to get writing code and submit a pull request for this one
if there is broad agreement from you guys

Any thoughts?

Thanks,

Paul

Sebastien Lambla

unread,
Oct 25, 2011, 7:10:36 AM10/25/11
to openwra...@googlegroups.com
wrong mailing list :)
________________________________________
From: openwra...@googlegroups.com [openwra...@googlegroups.com] on behalf of paulcampbell_ [paulgc...@gmail.com]
Sent: 25 October 2011 12:04
To: OpenWrap Development Mailing List
Subject: [openwrap-devl] OperationResult.BadRequest, 4XX responses and error collections
Reply all
Reply to author
Forward
0 new messages