ServiceStack/ServiceStack — pull request #880 by robert4 (2014-02-02 02:31:22+00:00)
Title: Fix exception handling of async actions of services

The continuation Task in `ServiceStackHandlerBase.HandleResponse()`
examines the Task state in wrong order. Checks `task.IsCompleted` first,
which is ["true when the task is in one of the three final states:
RanToCompletion, Faulted, or Canceled."](http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.iscompleted)

Therefore the `errorCallback()` never gets called, defeating the [Error Handling](https://github.com/ServiceStack/ServiceStack/wiki/Error-Handling)
mechanism whenever a service returns asynchronous Tasks that raise Exceptions.

The fix I suggest is not tested, although seems to be trivial.