From 2536b10ef1d68d3c7c7dec47b2bcfde9d7b0e61c Mon Sep 17 00:00:00 2001 From: mkovalua Date: Thu, 15 Jan 2026 12:42:59 +0200 Subject: [PATCH] avoid /request-access/ page redirection on /registries/drafts/* viewing if some APIs returns 403 (/children, /files, ...) --- src/app/core/interceptors/error.interceptor.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/core/interceptors/error.interceptor.ts b/src/app/core/interceptors/error.interceptor.ts index b87629369..df5a58c0d 100644 --- a/src/app/core/interceptors/error.interceptor.ts +++ b/src/app/core/interceptors/error.interceptor.ts @@ -71,8 +71,10 @@ export const errorInterceptor: HttpInterceptorFn = (req, next) => { if (error.url?.includes('v2/nodes/')) { const match = error.url.match(/\/nodes\/([^/]+)/); const id = match ? match[1] : null; - - router.navigate([`/request-access/${id}`]); + const draftRegistryUrlRegex = /\/registries\/drafts\/.+/i; + if (!draftRegistryUrlRegex.test(router.url)) { + router.navigate([`/request-access/${id}`]); + } } else { router.navigate(['/forbidden']); }