Catch errors in form update

pull/4338/head
Oliver Günther 9 years ago
parent 7a72890679
commit d0986f3536
  1. 6
      frontend/app/components/api/api-v3/hal-resources/work-package-resource.service.ts

@ -97,8 +97,7 @@ export class WorkPackageResource extends HalResource {
public getForm() {
if (!this.form) {
this.form = this.$links.update(this);
this.form.catch(error => {
this.updateForm(this.$source).catch(error => {
NotificationsService.addError(error.data.message);
});
}
@ -163,7 +162,8 @@ export class WorkPackageResource extends HalResource {
}).catch((error) => {
deferred.reject(error);
});
});
})
.catch(deferred.reject);
return deferred.promise;
}

Loading…
Cancel
Save