Browse Source
Bugfix/improve error handling in get quotes of FMP service (#7334)
* Improve error handling
* Update changelog
pull/7333/head^2
Thomas Kaul
14 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
13 additions and
5 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts
|
|
|
@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
- Set the change detection strategy to `OnPush` in the registration page |
|
|
|
- Set the change detection strategy to `OnPush` in the resources pages |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Improved the error handling in the get quotes functionality of the _Financial Modeling Prep_ service |
|
|
|
|
|
|
|
## 3.26.0 - 2026-07-14 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
|
|
@ -47,7 +47,7 @@ import { |
|
|
|
isSameDay, |
|
|
|
parseISO |
|
|
|
} from 'date-fns'; |
|
|
|
import { uniqBy } from 'lodash'; |
|
|
|
import { isArray, uniqBy } from 'lodash'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
|
export class FinancialModelingPrepService |
|
|
|
@ -440,10 +440,14 @@ export class FinancialModelingPrepService |
|
|
|
signal: AbortSignal.timeout(requestTimeout) |
|
|
|
} |
|
|
|
) |
|
|
|
.then( |
|
|
|
(res) => |
|
|
|
res.json() as unknown as { price: number; symbol: string }[] |
|
|
|
) |
|
|
|
.then(async (res) => { |
|
|
|
const json = (await res.json()) as unknown as { |
|
|
|
price: number; |
|
|
|
symbol: string; |
|
|
|
}[]; |
|
|
|
|
|
|
|
return isArray(json) ? json : []; |
|
|
|
}) |
|
|
|
]); |
|
|
|
|
|
|
|
for (const { currency, symbolTarget } of assetProfileResolutions) { |
|
|
|
|