Merge pull request #5249 from mempool/nymkappa/fix-auth-issue

[auth] catch auth error and return null
This commit is contained in:
softsimon 2024-07-02 18:23:12 +09:00 committed by GitHub
commit 2ff3d00bd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { map, Observable, ReplaySubject, switchMap, tap } from 'rxjs'; import { catchError, map, Observable, of, ReplaySubject, switchMap, tap } from 'rxjs';
import { ServicesApiServices } from './services-api.service'; import { ServicesApiServices } from './services-api.service';
export interface IAuth { export interface IAuth {
@ -43,7 +43,8 @@ export class AuthServiceMempool {
}), }),
map((user) => { map((user) => {
return user; return user;
}) }),
catchError(() => of(null)),
); );
} }