ShopifySharp
ShopifySharp copied to clipboard
OrderService - UpdateAsync - Missing phone error
shipping_address: phone can't be blank at ShopifySharp.ShopifyService.CheckResponseExceptions(HttpResponseMessage response, String rawResponse)
[3/12/2019 10:05:41 PM] at ShopifySharp.ShopifyService.<>c__DisplayClass21_0`1.<<ExecuteRequestAsync>b__0>d.MoveNext()
[3/12/2019 10:05:41 PM] --- End of stack trace from previous location where exception was thrown ---
[3/12/2019 10:05:41 PM] at ShopifySharp.DefaultRequestExecutionPolicy.Run[T](CloneableRequestMessage request, ExecuteRequestAsync`1 executeRequestAsync)
[3/12/2019 10:05:41 PM] at ShopifySharp.ShopifyService.ExecuteRequestAsync[T](RequestUri uri, HttpMethod method, HttpContent content, String rootElement)
[3/12/2019 10:05:41 PM] at ShopifySharp.OrderService.UpdateAsync(Int64 orderId, Order order)
I am just grabbing an existing order, changing some tags, then updating, and I receive this error. I am doing nothing with addresses, so its obviously a valid order going in...maybe we just need to ignore a field?
Strange, I wonder if it being null vs empty would make a difference?
A fair question. Let me look at the order.
You appear to be correct, shopify's API returns a string.Empty. Bug on their end, but we should probably work around it somehow.
"phone": "",