A
Size: a a a
A
Н
OS
A
A
IB
A
ТЖ
A
АГ
ТЖ
ТЖ
A
ТЖ
@Injectable()
export class ServerErrorInterceptor implements HttpInterceptor {
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
return next.handle(request).pipe(
retry(1),
catchError((error: HttpErrorResponse) => {
if (error.status === 401) {
// refresh token
} else {
return throwError(error);
}
})
);
}
}
D
DT
NM
ДМ
DT
ДМ