You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While investigating an issue with our tax responses coming back as bad we received this in the response. We should limit the itemCode field to 50 characters as requested. We should also look into any other fields that have limits.
{
"error" => {
"code" => "ModelStateInvalid",
"message" => "Field 'itemCode' has an invalid length.",
"target" => "HttpRequest",
"details" => [
[0] {
"code" => "MaxStringLengthError",
"number" => 14,
"message" => "Field 'itemCode' has an invalid length.",
"description" => "Field 'itemCode' must be no more than 50 characters in length.",
"faultCode" => "Client",
"helpLink" => "http://developer.avalara.com/avatax/errors/MaxStringLengthError",
"severity" => "Error"
}
]
}
}
For us it was the shipping_method.name. We display the name on the frontend so it allows editing more easily than having it hard coded. Changing to shipping_method.internal_name would have resolved it for us but may still not for others. I used truncate in the patch for our site but that can interfere with items that may be set specifically in AvaTax that are taxing based on itemCode instead of relying on the category.
I think substr or truncate are fine the issue is just to get it down to 50 characters to be in compliance of their API.
While investigating an issue with our tax responses coming back as bad we received this in the response. We should limit the
itemCode
field to 50 characters as requested. We should also look into any other fields that have limits.Affected lines
solidus_avatax_certified/app/models/solidus_avatax_certified/line.rb
Line 33 in 0cbfe60
solidus_avatax_certified/app/models/solidus_avatax_certified/line.rb
Line 62 in 0cbfe60
solidus_avatax_certified/app/models/solidus_avatax_certified/line.rb
Line 100 in 0cbfe60
The text was updated successfully, but these errors were encountered: