diff --git a/src/app/task-form/task-form.component.ts b/src/app/task-form/task-form.component.ts index 329e5a2..602ef0c 100644 --- a/src/app/task-form/task-form.component.ts +++ b/src/app/task-form/task-form.component.ts @@ -33,7 +33,11 @@ export class TaskFormComponent implements OnInit { } else { this.task = { title: this.title, content: this.content }; - this.backendService.postTask(this.task); + this.backendService.postTask(this.task).subscribe(response => { + if (response.status > 399) { + alert('Fehler'); + } + }); } this.submitted = true; this.activeModalService.close();