Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PurchaseOrder errors array not being populated #453

Open
SimonBrazell opened this issue Sep 20, 2018 · 1 comment
Open

PurchaseOrder errors array not being populated #453

SimonBrazell opened this issue Sep 20, 2018 · 1 comment

Comments

@SimonBrazell
Copy link

Hello,

I'm attempting to use the gem to upload purchase orders from another app to Xero but I'm running into validation errors which I'd like to handle. However the puchase_order.errors array isn't being populated with the validation errors when save fails:

xero_purchase_order.save
# false
xero_purchase_order.errors
# []
xero_purchase_order.save!
# *** Xeroizer::ApiException Exception: ValidationException: A validation exception occurred 
# ...

Is this a bug or is it expected behaviour?

@drewish
Copy link
Contributor

drewish commented Nov 11, 2019

We've also been seeing these errors raised rather than having them parsed and placed on the object as errors:

ValidationException: A validation exception occurred Generated by the following XML: <ApiException xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ErrorNumber>10</ErrorNumber> <Type>ValidationException</Type> <Message>A validation exception occurred</Message> <Elements>...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants