Skip to content
Browse files

Serialize InnerException if exists instead (if it's not a IHttpError)

  • Loading branch information...
1 parent d046c80 commit a313888b375411c48c59127c7aa6c0ee63e60cc0 @mythz mythz committed Apr 4, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/ServiceStack.ServiceInterface/ServiceBase.cs
View
3 src/ServiceStack.ServiceInterface/ServiceBase.cs
@@ -207,6 +207,9 @@ public object Execute(TRequest request)
protected virtual object HandleException(TRequest request, Exception ex)
{
+ if (ex.InnerException != null && !(ex is IHttpError))
+ ex = ex.InnerException;
+
var responseStatus = ResponseStatusTranslator.Instance.Parse(ex);
if (EndpointHost.UserConfig.DebugMode)

2 comments on commit a313888

@KillerKing

Can you explain why this is being done?

@mythz
ServiceStack member
mythz commented on a313888 Aug 13, 2012

it was requested, and it looked to provide a better info on the cause of the exception.

Please sign in to comment.
Something went wrong with that request. Please try again.