Capture errors from offline events synchronization
While we synchronize the offline events with the server () we should listen to any errors that come to us in response. In case we receive an error, we should save that error in the user's browser so that we can, later on, display that information to them.
The error must contain the information about the whole stock event that failed (so that it can be displayed and also retried)
Tested with success
The error message is displayed if something went wrong
openlmis.stockEventsSynchronizationErrors is added to the LocalStorage and here we can find more information about the error
The error is saved in the user's browser so that we can, later on, display that information to them.