I am using ServiceStack with excellent results so far, except that dealing with errors seems complicated. If something went wrong during serialization of the message (because I forgot to add a default constructor to the message, for example), the entire client returns - this is a message stating that the server had an internal error and status code 500. Adding a listener to the event HttpApplication.Error in Global.asax does not work, since it never hits. Also there is no Application_Error . Not only is this not enough for end-user scripts, it makes debugging these errors very cumbersome, as the only way to find out what went wrong is with the ugly expression in Quick Watch:
Encoding.Default.GetString( ((System.IO.MemoryStream)((SyncMemoryStream)((System.Net.HttpWebResponse)(((WebException)ex).Response)).ResponseStream))._buffer)
What I would like is to catch any errors on the server side (be it ServiceStack serialization or errors in my services) and add the necessary information to the Errors collection, which has all my message types.
stringargs
source share