Skip to content
Snippets Groups Projects
Commit f1b9a35c authored by Xiao Gui's avatar Xiao Gui
Browse files

chore: fix unit tests

(pureConstant service now is responsible for fetching templates etc. catch error when it occurs)
parent 3369956a
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,11 @@ export class PureContantService implements OnDestroy{
)
public getTemplateEndpoint$ = this.http.get<any[]>(`${this.backendUrl}templates`, { responseType: 'json' }).pipe(
shareReplay(1)
catchError(() => {
this.log.warn(`fetching root /tempaltes error`)
return of([])
}),
shareReplay(),
)
public initFetchTemplate$ = this.getTemplateEndpoint$.pipe(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment