aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/cupboard/cupboard.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-ui/src/app/components/cupboard/cupboard.component.ts')
-rw-r--r--ufund-ui/src/app/components/cupboard/cupboard.component.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.ts b/ufund-ui/src/app/components/cupboard/cupboard.component.ts
index 4088ae4..1b6d658 100644
--- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts
+++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts
@@ -101,7 +101,12 @@ needs: any;
};
console.log("need:", need);
console.log(need.id, need, "need updated");
- this.cupboardService.updateNeed(need.id, need).subscribe(
+ this.cupboardService.updateNeed(need.id, need)
+ .pipe(catchError((ex, r) => {
+ this.statusText.next("Max goal must be greater than 0 " + friendlyHttpStatus[ex.status])
+ return of()
+ }))
+ .subscribe(
(result) => {
if (result) {
console.log("need updated successfully");