From 31e73f9df9828c150835a49b7e4d146bc813baac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 26 Mar 2024 22:57:11 +0000 Subject: [PATCH] Clear cache on any 401 response errors (#1634) * fixes clear cache on 401/403 Signed-off-by: Shenoy Pratik * remove 403 check Signed-off-by: Shenoy Pratik --------- Signed-off-by: Shenoy Pratik (cherry picked from commit ce4d69fc9a6973ac3232b8b58462d8b7feb1dd94) Signed-off-by: github-actions[bot] --- public/framework/catalog_cache/cache_intercept.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/framework/catalog_cache/cache_intercept.ts b/public/framework/catalog_cache/cache_intercept.ts index a44256aedd..3f50bf00b1 100644 --- a/public/framework/catalog_cache/cache_intercept.ts +++ b/public/framework/catalog_cache/cache_intercept.ts @@ -7,15 +7,11 @@ import { HttpInterceptorResponseError, IHttpInterceptController, } from '../../../../../src/core/public'; -import { SECURITY_PLUGIN_ACCOUNT_API } from '../../../common/constants/shared'; import { CatalogCacheManager } from './cache_manager'; export function catalogCacheInterceptError(): any { return (httpErrorResponse: HttpInterceptorResponseError, _: IHttpInterceptController) => { - if ( - httpErrorResponse.response?.status === 401 && - httpErrorResponse.fetchOptions.path === SECURITY_PLUGIN_ACCOUNT_API - ) { + if (httpErrorResponse.response?.status === 401) { // Clears all user catalog cache details CatalogCacheManager.clearDataSourceCache(); CatalogCacheManager.clearAccelerationsCache();