E
E
Egor Antropov2019-07-23 12:32:13
Angular
Egor Antropov, 2019-07-23 12:32:13

How to handle 401 error?

5d36d3c297c20669849280.png
We need to handle this error in order to add an inscription under the form, indicating that incorrect data has been entered.

something like that
<mat-error *ngIf="passForm.hasError('required')">Необходимо указать пароль</mat-error>
<mat-error *ngIf="passForm.hasError('minlength')">Пароль должен быть более шести символов</mat-error>

I understand that I need to find out if there is such an error and if its status is 401, but I don’t understand how to do it

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question