HOTFIX: Client API Error Fix
Null value for one of the totals on the cart was causing an error in the client api while mapping. Fixes the error below (they must be hitting this a ton to generate these like they did).
AmeriCommerce Error on Circulon
Web Server:
411951-WEB8
Time/Date:
8/9/2013 @ 4:35 PM
Code Version:
2012.4.808.4
IP Address:
74.190.108.197
User Agent:
Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3
Host Name:
Page Requested: https://shop.circulon.com/clientapi/cart?_cb=AC.api._callbacks.ac165cd5d38
Referer: http://www.circulon.com/
Click Here To View Session
Error: Base Exception: System.ApplicationException: Attempted to access the value of a null data type.
at AC.DataMoney.get_Value() in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\AC\DataMoney.cs:line 129
at AC.DataMoney.op_Implicit(DataMoney pdValue) in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\AC\DataMoney.cs:line 85
at AmeriCommerce.ClientApi.Mapping.FullCartTypeConverter.Convert(ResolutionContext context) in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\Store\ClientApi\Mapping\FullCartTypeConverter.cs:line 13
at AutoMapper.MappingExpression`2.<>c__DisplayClass15.b__14(ResolutionContext context)
at AutoMapper.Mappers.TypeMapObjectMapperRegistry.CustomMapperStrategy.Map(ResolutionContext context, IMappingEngineRunner mapper)
at AutoMapper.Mappers.TypeMapMapper.Map(ResolutionContext context, IMappingEngineRunner mapper)
at AutoMapper.MappingEngine.AutoMapper.IMappingEngineRunner.Map(ResolutionContext context)
Exception:AutoMapper.AutoMapperMappingException:
Mapping types:
acCart -> DetailedCartOutputModel
AmeriCommerce.Common.acCart -> AmeriCommerce.ClientApi.Models.OutputModels.DetailedCartOutputModel
Destination path:
DetailedCartOutputModel
Source value:
AmeriCommerce.Common.acCart ---> System.ApplicationException: Attempted to access the value of a null data type.
at AC.DataMoney.get_Value() in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\AC\DataMoney.cs:line 129
at AC.DataMoney.op_Implicit(DataMoney pdValue) in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\AC\DataMoney.cs:line 85
at AmeriCommerce.ClientApi.Mapping.FullCartTypeConverter.Convert(ResolutionContext context) in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\Store\ClientApi\Mapping\FullCartTypeConverter.cs:line 13
at AutoMapper.MappingExpression`2.<>c__DisplayClass15.b__14(ResolutionContext context)
at AutoMapper.Mappers.TypeMapObjectMapperRegistry.CustomMapperStrategy.Map(ResolutionContext context, IMappingEngineRunner mapper)
at AutoMapper.Mappers.TypeMapMapper.Map(ResolutionContext context, IMappingEngineRunner mapper)
at AutoMapper.MappingEngine.AutoMapper.IMappingEngineRunner.Map(ResolutionContext context)
--- End of inner exception stack trace ---
at AutoMapper.MappingEngine.AutoMapper.IMappingEngineRunner.Map(ResolutionContext context)
at AutoMapper.MappingEngine.Map(Object source, Type sourceType, Type destinationType, Action`1 opts)
at AutoMapper.MappingEngine.Map[TDestination](Object source, Action`1 opts)
at AutoMapper.MappingEngine.Map[TDestination](Object source)
at AutoMapper.Mapper.Map[TDestination](Object source)
at AmeriCommerce.ClientApi.Controllers.CartController.Index() in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\Store\ClientApi\Controllers\CartController.cs:line 18
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.b__5()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.b__0()
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Inner Exception: System.ApplicationException: Attempted to access the value of a null data type.
at AC.DataMoney.get_Value() in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\AC\DataMoney.cs:line 129
at AC.DataMoney.op_Implicit(DataMoney pdValue) in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\AC\DataMoney.cs:line 85
at AmeriCommerce.ClientApi.Mapping.FullCartTypeConverter.Convert(ResolutionContext context) in c:\TeamCity\agents\BuildAgent1\work\5ee4d40176c9b10d\Store\ClientApi\Mapping\FullCartTypeConverter.cs:line 13
at AutoMapper.MappingExpression`2.<>c__DisplayClass15.b__14(ResolutionContext context)
at AutoMapper.Mappers.TypeMapObjectMapperRegistry.CustomMapperStrategy.Map(ResolutionContext context, IMappingEngineRunner mapper)
at AutoMapper.Mappers.TypeMapMapper.Map(ResolutionContext context, IMappingEngineRunner mapper)
at AutoMapper.MappingEngine.AutoMapper.IMappingEngineRunner.Map(ResolutionContext context)
Please sign in to leave a comment.
Comments
0 comments