From 4921c001ba75146d2df060ff754bebb18ad64828 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 15 Oct 2026 08:07:50 +0200 Subject: [PATCH] Bugfix/undefined time zone in auth interceptor (#8181) * Fix exception when time zone of browser unavailable * Update changelog --- CHANGELOG.md | 4 ++++ apps/client/src/app/core/auth.interceptor.ts | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf5223f709..2b89e4e56a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Hardened the validation of the date in the endpoint to create an account balance - Upgraded `bootstrap` from version `4.6.2` to `5.3.8` +### Fixed + +- Fixed an exception in the authentication interceptor when the time zone of the browser is not available + ## 3.86.0 - 2026-10-13 ### Added diff --git a/apps/client/src/app/core/auth.interceptor.ts b/apps/client/src/app/core/auth.interceptor.ts index 04be154786..b42c372be1 100644 --- a/apps/client/src/app/core/auth.interceptor.ts +++ b/apps/client/src/app/core/auth.interceptor.ts @@ -38,10 +38,13 @@ export class AuthInterceptor implements HttpInterceptor { return next.handle(request); } - let headers = request.headers.set( - HEADER_KEY_TIMEZONE, - Intl?.DateTimeFormat().resolvedOptions().timeZone - ); + let headers = request.headers; + + const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; + + if (timezone) { + headers = headers.set(HEADER_KEY_TIMEZONE, timezone); + } const token = this.tokenStorageService.getToken();