Walmart Inventory Update PUT API randomly returns 400 every once in a while

245 views Asked by At

I have been seeing this error popup every once in a while during inventory update process

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:errors xmlns:ns2="http://walmart.com/">
  <ns2:error>
    <ns2:code>2.GMP_INVENTORY_API</ns2:code>
    <ns2:field>Inventory</ns2:field>
    <ns2:description>Update failed even after retries</ns2:description>
    <ns2:info>Update failed even after retries</ns2:info>
    <ns2:severity>ERROR</ns2:severity>
    <ns2:category>DATA</ns2:category>
    <ns2:causes/>
    <ns2:errorIdentifiers/>
  </ns2:error>
</ns2:errors> 

Is there a specific reason for this to happen ?

1

There are 1 answers

1
toastifer On

A 400 error is 'Bad Request'. Usually that means the fault is on your end.

The first thing to do is check the requests you've been sending. Logging them, especially the ones that result in an error, is a good idea.

Things to check:

  • Try sending the same body again. If you get the same error, then something is wrong with it.
  • Check that the syntax is ok. Use a validator.
  • Check the backing data. Can you notice any patterns to when it fails? Only when 'SKU_1234' is included? Are you sending a negative number for quantity? Are there any unescaped special characters in your data?