Show cool things you have done with our products


Post by bielik91 »

Hello I would like to know what is the best error handling solution when for example eventStore load data and server return response like this:
{success: false, errors['err1', err'2']}
Currently i have something like below:

eventStore.load(function(records, operation, success) {
// success property is always true 
});

In code above succes arg is always true (server return json with success proterty set to false )

Thanks for some advices :)

Post by mats »

You can use both server side error status code, 500 etc. Or set the successProperty to false manually, all up to you what you prefer - hard to give general advice.

Post Reply