Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Bugfix/undefined time zone in auth interceptor (#8181)

Thomas Kaul4921c001ba75
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();