xero-python's string length validation is not consistent with Xero
DamianHeard opened this issue · 3 comments
xero-python does client side string length validation. This validation is inconsistent with the length Xero supports.
We have found an example where we are running into this ValueError when retrieving data directly from Xero. The Contact name in question has length 263. This would seem to imply that the xero API actually supports names with length greater than 256.
+1
This is validating data coming out of Xero, making it hard for us as developers to deal with it without implementing monkeypatches for xero-python, or telling our customers to clean up their data..
I'd propose relaxing this validation for data coming out of Xero, or aggressively updating all contacts in Xero to conform to this limit..
Confirmed.
These limits were translated over from the available API documentation at the time though it seems Xero is not restricting the character length for contact name.
This will need to be addressed at the Xero-OpenAPI yaml spec level as it currently affects all SDKs
Hi @RettBehrens, was this addressed in the end? Every now and against we're still seeing errors like:
ValueError - Invalid value for
name
, length must be less than or equal to255
.
Which we can do nothing about because all we're doing is retrieving customer data. To date we've just been reaching out to the customer and asking them to reduce the name length, but it's a painful process..