Retrieving Errors/Warnings
Posted: Thu Jul 11, 2019 10:37 am
So I'm working on an internal API for softpro that was started by a different person a few months ago.
They have a service sitting somewhere with custom validations using OrderSavingEventArgs.AddError
API-side, when I try to save an order with OrderStore.ApplyChanges(Iorder), if the validation fails, it tells me that it failed, but I can't seem to get a hold of the errors themselves. I would really like to get the text out of them so I can return it to the API caller instead of making them guess at the error since they have like 200 rules.
I suppose I could pull their service into the API, and build a system to copy them or something, but it seems like there should be a simple solution to getting a hold of them that I just can not find. Thanks for the help.
They have a service sitting somewhere with custom validations using OrderSavingEventArgs.AddError
API-side, when I try to save an order with OrderStore.ApplyChanges(Iorder), if the validation fails, it tells me that it failed, but I can't seem to get a hold of the errors themselves. I would really like to get the text out of them so I can return it to the API caller instead of making them guess at the error since they have like 200 rules.
I suppose I could pull their service into the API, and build a system to copy them or something, but it seems like there should be a simple solution to getting a hold of them that I just can not find. Thanks for the help.