Common error: `123` is not a valid number

This issue is seen when PUT/POST requests in the API include a non-numeric value for a numeric field. It should have a name property of “TypeError” and a message stating that the input value “is not a valid number”. This error can be a bit tricky to spot if the user has passed in a string representation of a number.

Example with non-numeric value in numeric field:

Example with numeric value in numeric field:

Because this API uses the HTTP 207 multi-response status code it is important to look at the body of the responses received from PUT/POST/DELETE methods to ensure that you are not missing validation errors for individual records included in your requests.

Example response body with validation errors:


This PUT request had five individual production records to upsert, and all five records had validation issues. You can see the failedCount property indicates that 5 errors were encountered, and the results array includes a validation error message for each record (some were collapsed for brevity)

1 Like