Differences between has_errors and has_validation_errors
I find that for Invoice, there is has_errors as well as validation_errors for us to loop through.
Whilst for Contact, it is has_validation_errors as well as validation_errors.
Is there any difference between these 2 and is it possible to be consistent and just use has_validation_errors?
Yes this is something that will be prioritized for upcoming work.
To explain that quickly though - Xero's multiple api sets return mainly validation_errors: [] but a few of the Api sets & endpoints differ a bit. Work will be to normalize error into validation_errors:
Hey @raouldevil wanted to get your eyes across this as it relates to #116
Some of the api sets (payroll, etc) have a different format of the error that comes back. If you can have a quick read through and add any other context I think the work will be related so want to make sure everyone has a chance to vote on output prior to release as this will likely be a breaking change.
@SerKnight I think the above makes sense, as long as there isn't 5 different categories of errors for example. So maybe when the gem raises an exception it has Error: (for authentication and other problems) and Validation Errors: for when something is created or edited. As long as we can easily parse this and pull out information.