I’m having a bit of a fight regarding showing the user the error that came from a SS API:
the message I’m catching in ServiceExceptionHandlers is the correct one, but the catch (ServiceStack.WebServiceException ex) only gives me Internal Server Error and nothing more …
The webapp only receives “Internal message error”, how can I pass that really important message back?
You need to be careful when overriding the default Exception handling as you could change what the Service Clients expect to receive and your Custom SendException() could itself be throwing an error which hides the original Exception which if it did would return a Internal Server Error that you’re also seeing.
Can you post the raw HTTP Headers containing the Error so I can see if it’s being sent correctly?
If the Exception is properly sent you can retrieve the Exception info from the ResponseStatus property of WebServiceException which should also be available in ErrorCode, ErrorMessage and ServerStackTrace if avaialble.
This Exception isn’t being handled by ServiceStack, there’s an Error with the Exception handling which is being bubbled up into ASP.NET to cause this YSOD. Can you provide a small example where I’m able to repro this error locally, also if you comment out your custom Error Handling do you still get the ASP.NET YSOD page?