Skip to content
Snippets Groups Projects
Verified Commit 97a3323b authored by Alexander-Krause's avatar Alexander-Krause
Browse files

error handling fixed

parent 2a276f46
No related branches found
No related tags found
No related merge requests found
......@@ -17,16 +17,19 @@ export default Component.extend(AlertifyHandler, {
saveAgent() {
const self = this;
if(this.get('procezz.hasDirtyAttributes')){
if(this.get('agent.hasDirtyAttributes')){
this.set('showSpinner', true);
this.get('').save().then(() => {
this.get('agent').save().then(() => {
self.set('showSpinner', false);
self.handleMessageForUser();
})
.catch((errorObject) => {
self.get('agent').rollbackAttributes();
self.set('agent.errorOccured', true);
self.set('agent.errorMessage', errorObject);
// closure action from discovery controller
self.errorHandling(errorObject);
});
......
......@@ -35,6 +35,9 @@ export default Component.extend(AlertifyHandler, {
self.get('procezz').rollbackAttributes();
self.set('procezz.errorOccured', true);
self.set('procezz.errorMessage', errorObject);
// closure action from discovery controller
self.errorHandling(errorObject);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment