Browse Source

Deactivate delisted asset profiles

pull/6808/head
Thomas Kaul 2 weeks ago
parent
commit
633cb0891b
  1. 5
      apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts

5
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 { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service';
import { CryptocurrencyService } from '@ghostfolio/api/services/cryptocurrency/cryptocurrency.service'; import { CryptocurrencyService } from '@ghostfolio/api/services/cryptocurrency/cryptocurrency.service';
import { AssetProfileDelistedError } from '@ghostfolio/api/services/data-provider/errors/asset-profile-delisted.error';
import { import {
DataProviderInterface, DataProviderInterface,
GetAssetProfileParams, GetAssetProfileParams,
@ -122,7 +123,9 @@ export class FinancialModelingPrepService
).then((res) => res.json()); ).then((res) => res.json());
if (!assetProfile) { if (!assetProfile) {
throw new Error(`${symbol} not found`); throw new AssetProfileDelistedError(
`No data found, ${symbol} (${this.getName()}) may be delisted`
);
} }
const { assetClass, assetSubClass } = const { assetClass, assetSubClass } =

Loading…
Cancel
Save