Skip to content

Commit

Permalink
fix: pin login failures
Browse files Browse the repository at this point in the history
uzenith360 committed Apr 29, 2024
1 parent 7ae4f73 commit 9443d8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/ngx-jwt-auth/src/lib/auth.service.ts
Original file line number Diff line number Diff line change
@@ -36,12 +36,12 @@ export class AuthService {
switch (err.status) {
case 400:
case 401:
return throwError(() => new HttpError('Login details are incorrect, use forgot password', err.status));
return throwError(() => new HttpError(err.message ?? 'Login details are incorrect, use forgot password', err.status));
case 500:
return throwError(() => new HttpError('Problem logging in, please try again', err.status));
return throwError(() => new HttpError(err.message ?? 'Problem logging in, please try again', err.status));
case 0:
default:
return throwError(() => new HttpError('Problem logging in, please check network and try again', err.status));
return throwError(() => new HttpError(err.message ?? 'Problem logging in, please check network and try again', err.status));
};
},
),

0 comments on commit 9443d8e

Please sign in to comment.