Umbraco Commerce debugging
# help-with-umbraco
u
Hey! So I'm new with Umbraco Commerce, and I'm noticing that the debugging experience leaves something to be desired. Right now I'm getting a generic
Copy code
body: {
    type: 'Error',
    title: 'Object reference not set to an instance of an object.',
    status: 500,
    detail: '   at Umbraco.Commerce.Infrastructure.Resiliency.PollyExecutionStrategyBase.Execute[TResult](Func`1 operation, Func`1 verifySucceeded)\n' +
      '   at Umbraco.Commerce.Core.UmbracoCommerceUnitOfWorkProvider.Execute[T](IUnitOfWorkOptions options, Func`2 action)\n' +
      '   at Umbraco.Commerce.Core.UmbracoCommerceUnitOfWorkProvider.Execute[T](Func`2 action)\n' +
      '   at Umbraco.Commerce.Cms.Web.Api.Storefront.Controllers.AddProductToOrderStorefrontApiController.Post(StoreSessionDto session, Guid orderId, AddProductRequestDto requestDto, OptionsDto options)\n' +
      '   at lambda_method232(Closure, Object, Object[])\n' +
error when I try to add a product to a cart. Everything is under "UnitOfWorkProvider" which is not super nice. This should be after the price is fetched because when I remove prices from my product adapter, I get a price error instead. The add product requests looks like this:
Copy code
url: '/umbraco/commerce/storefront/api/v1/order/{orderId}',
    path: { orderId: '5843556a-d3b2-4af3-a755-018c92dae20c' },
    headers: {
      'Api-Key': 'test',
      Store: 'sPMaskiner',
      'Current-Order': undefined,
      'Billing-Country': undefined,
      'Billing-Region': undefined,
      'Shipping-Country': undefined,
      'Shipping-Region': undefined,
      'Tax-Class': undefined,
      Currency: 'SEK',
      'Accept-Language': undefined,
      'Customer-Reference': 'faeb7be7-c7ad-4157-b496-2d7e7391da1e'
    },
    query: { expand: undefined, fields: undefined },
    body: { quantity: 1, productReference: '01-10001' },
which I believe should be okay since Billing-Country etc should be the default
4 Views