diff --git a/src/portal/src/app/config/gc/gc.api.repository.ts b/src/portal/src/app/config/gc/gc.api.repository.ts index 04de55d38..49cfe7e18 100644 --- a/src/portal/src/app/config/gc/gc.api.repository.ts +++ b/src/portal/src/app/config/gc/gc.api.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; -import { Observable } from 'rxjs'; +import { throwError as observableThrowError, Observable } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; @@ -15,34 +15,34 @@ export class GcApiRepository { public postSchedule(param): Observable { return this.http.post("/api/system/gc/schedule", param) - .pipe(catchError(err => Observable.throw(err))); + .pipe(catchError(error => observableThrowError(error))); } public putSchedule(param): Observable { return this.http.put("/api/system/gc/schedule", param) - .pipe(catchError(err => Observable.throw(err))); + .pipe(catchError(error => observableThrowError(error))); } public getSchedule(): Observable { return this.http.get("/api/system/gc/schedule") - .pipe(catchError(err => Observable.throw(err))) + .pipe(catchError(error => observableThrowError(error))) .pipe(map(response => response.json())); } public getLog(id): Observable { return this.http.get("/api/system/gc/" + id + "/log") - .pipe(catchError(err => Observable.throw(err))); + .pipe(catchError(error => observableThrowError(error))); } public getStatus(id): Observable { return this.http.get("/api/system/gc/" + id) - .pipe(catchError(err => Observable.throw(err))) + .pipe(catchError(error => observableThrowError(error))) .pipe(map(response => response.json())); } public getJobs(): Observable { return this.http.get("/api/system/gc") - .pipe(catchError(err => Observable.throw(err))) + .pipe(catchError(error => observableThrowError(error))) .pipe(map(response => response.json())); }