I have an issue I can’t repro on local dev. Using redis cached provider;
public object Get(getTotalOrderCnt req)
{
var sess = GetSession();
try
{
var expireInTimespan = new TimeSpan(0, 15, 0);
var cacheKey = <dollarsign>"getTotalOrderCnt:{sess.UserAuthId}";
return base.Request.ToOptimizedResultUsingCache(base.Cache, cacheKey, expireInTimespan, () =>
{
var rv = new getTotalOrderCntResponse();
try
{
//do something long running in database to populate rv
return rv;
}
catch (Exception e)
{
Log.Error("NONE", "Something bad happened inside getTotalOrderCnt ", e);
return rv;
}
});
}
catch(Exception e)
{
Log.Error("NONE", "Something bad happened getTotalOrderCnt ", e);
return e;
}
}
2018-09-29 16:25:07.966 [NONE]:ERROR:Unhandled Error in ServiceStack Service from /order/GetCntOnFileAllAccounts System.NullReferenceException: Object reference not set to an instance of an object.
at PublicAPI.AppHost.<>c__DisplayClass1_0.b__3(IRequest httpReq, IResponse res, Object responseDto) in D:\home\site\repository\src\PublicAPI\Startup.cs:line 198
at ServiceStack.ServiceStackHost.ApplyResponseFiltersSingleAsync(IRequest req, IResponse res, Object response)
at ServiceStack.ServiceStackHost.ApplyResponseFiltersAsync(IRequest req, IResponse res, Object response)
at ServiceStack.Host.Handlers.ServiceStackHandlerBase.HandleResponseNext(IRequest httpReq, IResponse httpRes, Object response)
at ServiceStack.Host.Handlers.ServiceStackHandlerBase.HandleResponse(IRequest httpReq, IResponse httpRes, Object response)
at ServiceStack.Host.RestHandler.ProcessRequestAsync(IRequest req, IResponse httpRes, String operationName)