diff --git a/src/app/core/data/base/base-data.service.ts b/src/app/core/data/base/base-data.service.ts index 544c01a69b..edd6d9e2a4 100644 --- a/src/app/core/data/base/base-data.service.ts +++ b/src/app/core/data/base/base-data.service.ts @@ -341,6 +341,11 @@ export class BaseDataService implements HALDataServic } } + /** + * Checks for the provided href whether a response is already cached + * @param href$ The url for which to check whether there is a cached response. + * Can be a string or an Observable + */ hasCachedResponse(href$: string | Observable): Observable { if (isNotEmpty(href$)) { if (typeof href$ === 'string') { @@ -359,6 +364,11 @@ export class BaseDataService implements HALDataServic throw new Error(`Can't check whether there is a cached response for an empty href$`); } + /** + * Checks for the provided href whether an ERROR response is currently cached + * @param href$ The url for which to check whether there is a cached ERROR response. + * Can be a string or an Observable + */ hasCachedErrorResponse(href$: string | Observable): Observable { return this.hasCachedResponse(href$).pipe( switchMap((hasCachedResponse) => {