From 9580cc94e5dfa3039638fd5cf89d1b08999826c1 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 22 Jun 2026 19:20:37 +0200 Subject: [PATCH] Bugfix/resolve exception in benchmark service when current market price unavailable (#7101) * Handle exception * Update changelog --- CHANGELOG.md | 1 + .../src/app/endpoints/benchmarks/benchmarks.service.ts | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 671c9f935..a20fd9645 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed an issue in the data provider service where asset profiles and historical data could be missing for symbols that exist in multiple data sources by keying the responses by the asset profile identifier +- Resolved an exception in the benchmarks service when the current market price is unavailable ## 3.13.0 - 2026-06-20 diff --git a/apps/api/src/app/endpoints/benchmarks/benchmarks.service.ts b/apps/api/src/app/endpoints/benchmarks/benchmarks.service.ts index 0b95880d4..1fe42ab0d 100644 --- a/apps/api/src/app/endpoints/benchmarks/benchmarks.service.ts +++ b/apps/api/src/app/endpoints/benchmarks/benchmarks.service.ts @@ -81,6 +81,14 @@ export class BenchmarksService { }) ]); + if (!currentSymbolItem) { + this.logger.error( + `No current market price is available for ${symbol} (${dataSource})` + ); + + return { marketData }; + } + const exchangeRates = await this.exchangeRateDataService.getExchangeRatesByCurrency({ startDate,