Skip to content

Commit

Permalink
fix(webapp): the initial 401 error is shown when it should not (#1102)
Browse files Browse the repository at this point in the history
Issue: DGW-226
  • Loading branch information
irvingoujAtDevolution authored Nov 11, 2024
1 parent 6026230 commit b54a666
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webapp/src/client/app/modules/login/login.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';

Expand Down Expand Up @@ -76,8 +77,8 @@ export class LoginComponent extends BaseComponent implements OnInit {
}
}

private handleAutoLoginError(error): Observable<boolean> {
if (error.status && error.status !== '401') {
private handleAutoLoginError(error: HttpErrorResponse): Observable<boolean> {
if (error?.status !== 401) {
console.error('Auto login:', error);
this.addMessages([
{
Expand Down

0 comments on commit b54a666

Please sign in to comment.