I have a listener that
onDelete(Invoice entity...
xeroService.deleteXeroInvoice(Invoice entity)
I don’t want to delete an invoice out of my system unless it was successfully deleted from Xero first.
If the invoice cannot be deleted in xero it will throw back an error like so:
> XeroApiException: {
> "ErrorNumber": 10,
> "Type": "ValidationException",
> "Message": "A validation exception occurred",
> ...
> "ValidationErrors": [
> {
> "Message": "Invoice not of valid status for modification"
> },
> {
> "Message": "This document cannot be edited as it has a payment or credit note allocated to it."
> }
> ]
is it possible to have the webClient show just the validation errors as an easy to read message instead of the whole stacktrace as pictured here:
How would I go about that?