Paolo ponzano - 205 - Nov 18, 2014

Hello Demis,
today I fell like a nightmare for you… I’ve got some services that returns void but in those case the exception if present is not propagated… I got errorcode 500 but no ErrorMessage or ErrorStatus… I’ve tried returning an empty class and in that case it works… I think it’s related to the fact that IReturnVoid doesn’t return HttpResponse so it won’t consider its content… what’s the besta pproach, should I replace all my IReturnVoid with IReturn<EmptyResponse>, this would also mean to change all my public void Any(SomeRequest xxx) to public object Any(SomeRequest xxx) and on the client part to change the Task to Task<EmptyResponse> …is there a simpler way?

I’ve added an exception handling test showing error responses of IReturnVoid methods at:

You can use IReturn<HttpWebResponse> to get the HttpWebResponse back, more info at:

You don’t need to change your Service method signature to use it - the IReturnVoid marker is just a client concern