Skip to content

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

Bugfix/resolve exception in benchmark service when current market price unavailable (#7101)

Thomas Kaul9580cc94e5df
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 671c9f935e..a20fd96456 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 0b95880d4c..1fe42ab0df 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,