ServiceStack/ServiceStack — pull request #817 by PilotMartin (2013-09-03 15:25:08+00:00)
Title: Fix for async exceptions during deserialization: added proper serialization/deserialization exception propagation

The current implementation causes incorrect handling by ServiceStack of web responses (ex.: 401 Authorization Required) when performing async calls (ex.: GetAsync()). ServiceStack expects a SerializationException - not a ProtoBuf.ProtoException. This causes the host application to crash instead of calling the OnError handler specified at the GetAsync call site.

Wrapping the exception in a SerializationException fixes this incorrect behavior, where ServiceStack analyses the response, generates the proper WebServiceException and calls the OnError handler, as expected.