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

Loading…
Cancel
Save