[auth] catch auth error and return null

This commit is contained in:
nymkappa 2024-07-02 10:37:40 +09:00
parent 3dbbc83077
commit 89a3b1c577
No known key found for this signature in database
GPG Key ID: 92358FC85D9645DE

View File

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
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';
export interface IAuth {
@ -43,7 +43,8 @@ export class AuthServiceMempool {
}),
map((user) => {
return user;
})
}),
catchError(() => of(null)),
);
}