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?
Thanks
I’ve added an exception handling test showing error responses of IReturnVoid methods at:
https://github.com/ServiceStack/ServiceStack/commit/2bb9478f66ccfeac683b2ec07d60453c88a7c815
You can use IReturn<HttpWebResponse> to get the HttpWebResponse back, more info at:
https://github.com/ServiceStack/ServiceStack/blob/master/release-notes.md#ireturnvoid-now-returns-void
You don’t need to change your Service method signature to use it - the IReturnVoid marker is just a client concern