ServiceStack/ServiceStack — pull request #201 by corkupine (2012-07-27 16:31:34+00:00)
Title: Corrected issue with incorrect exceptions being returned in authenticated scenarios

The client handles a failed request that required authentication by re-executing the original call with basic auth. When an exception occurs in the service after the client has been authenticated, the client still delivers an "unauthorized" exception. This is incorrect, since by the time you receive the exception the client has been authenticated and the actual exception is something else.

The culprit appears to be the try/catch blocks here...
https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Common/ServiceClient.Web/ServiceClientBase.cs#L368

...which prevent the intended catch block - with the intended behavior (note the comments) - from executing here:
https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Common/ServiceClient.Web/ServiceClientBase.cs#L382

Please excuse multiple (sloppy) commits...I do not have extensive experience with git/github.