Creating a new order - 'base - Internal error'

MStrudwick
Tourist
12 1 1

When making requests to the API to upload a new order, occasionally we will upload two orders in a row that are using the same customer name, address ect. However, when the call to upload the second order is made the API returns an error - `base - Internal error`. If we requeue the order that fails it will upload successfully. It's difficult to reproduce this error as both orders need to be uploaded at the same time - we've seen it twice in the last ~100 uploads.

Replies 2 (2)
awwdam
Shopify Staff
Shopify Staff
241 40 30

Hey @MStrudwick,

If you can reproduce this again, can you provide an example X-Request-Id headers from the request that is returning an error, as well as from the successful retry? Other insights such as an example request body, endpoints, and exact server errors may also help us get a better idea of the functionality! - Cheers

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

MStrudwick
Tourist
12 1 1

I will try to reproduce this error, and provide you with headers - don't have logs of the headers.

The endpoint is: `/admin/orders.json`

The exact error is the same as stated above: `base - Internal error`

This is the body that caused the error (removed some sensitive data - fields are not empty)

{
  "order": {
    "line_items": [
      {
        "variant_id": 39874618392755,
        "title": "",
        "price": 7.19,
        "quantity": 1,
        "properties": [
          {
            "name": "Order Date",
            "value": "2021-09-03"
          }
        ]
      },
      {
        "variant_id": 39874618458291,
        "title": "",
        "price": 7.19,
        "quantity": 1,
        "properties": [
          {
            "name": "Order Date",
            "value": "2021-09-03"
          }
        ]
      },
      {
        "variant_id": 39874615050419,
        "title": "",
        "price": 7.19,
        "quantity": 1,
        "properties": [
          {
            "name": "Order Date",
            "value": "2021-09-03"
          }
        ]
      },
      {
        "variant_id": 39874618032307,
        "title": "",
        "price": 7.19,
        "quantity": 1,
        "properties": [
          {
            "name": "Order Date",
            "value": "2021-09-03"
          }
        ]
      }
    ],
    "customer": {
      "id": 5130613424307
    },
    "shipping_address": {
      "first_name": "",
      "last_name": "",
      "address1": "",
      "phone": "",
      "city": ",
      "province": "",
      "country": "",
      "zip": ""
    },
    "shipping_lines": [
      {
        "title": "UPSN",
        "price": 0,
        "code": "UPSN"
      }
    ],
    "email": "",
    "source": "UPSN",
    "title": "UPSN, No Signature Required, Standard Service",
    "currency": "USD",
    "note": "Thank you for your purchase. If you ordered a dditional items they will arrive separately."
  }
}

 

The error occurs when we immediately upload another order (same endpoint), with the same shipping address details. The customer number always stays the same, as that is referencing a 'shop' rather than the actual customer. However, if we upload the failed order again it will succeeded.