Last post Jan 05, 2009 04:30 PM by onesmartguy
Dec 18, 2008 01:41 PM|onesmartguy|LINK
I was trying to gather some more info on the best practices for handling exceptions. I see lots of use of the HTTP Status code which is definitly great but what if we want to return a more descriptive information to the user. I would like to deliver something
like this to the serivce consumer.
<Response Object="Coffee" Action="BrewItUp" Rid="011201" status="Failure">
<Error ErrorCode="034" ErrorMessage="Out of cups" >
<Response Object="Coffee" Action="BrewItUp" Rid="011444" status="Success"> </Response>
Dec 19, 2008 09:08 AM|colinjack|LINK
Even sending an exception in the response would be useful, are there plans to add this capability?
Jan 02, 2009 01:57 PM|tvish|LINK
In the starter kit, the WebProtocolException allows you to send a string message (which might be the result of exception.ToString()) or any DataContract or XmlSerializer serializable detail object.
Does that address your requirements? The starter kit has samples - WebException and WebException2 - that demonstrate this.
Jan 05, 2009 04:30 PM|onesmartguy|LINK
Thanks... I will check this out and post up my experience.