diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aa0078b6..359ade060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Deactivated asset profiles automatically on delisting in the _Financial Modeling Prep_ service - Migrated various components from `NgClass` to class bindings - Refreshed the cryptocurrencies list - Improved the language localization for Spanish (`es`) diff --git a/apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts b/apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts index 27391130e..d9a43fc50 100644 --- a/apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts +++ b/apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts @@ -1,5 +1,6 @@ import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; import { CryptocurrencyService } from '@ghostfolio/api/services/cryptocurrency/cryptocurrency.service'; +import { AssetProfileDelistedError } from '@ghostfolio/api/services/data-provider/errors/asset-profile-delisted.error'; import { DataProviderInterface, GetAssetProfileParams, @@ -122,7 +123,9 @@ export class FinancialModelingPrepService ).then((res) => res.json()); if (!assetProfile) { - throw new Error(`${symbol} not found`); + throw new AssetProfileDelistedError( + `No data found, ${symbol} (${this.getName()}) may be delisted` + ); } const { assetClass, assetSubClass } =