diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a4ea20da..f72349223 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Improved the error logs for a timeout in the data provider services - Upgraded `prettier` from version `3.2.4` to `3.2.5` ## 2.47.0 - 2024-02-02 diff --git a/apps/api/src/services/data-provider/coingecko/coingecko.service.ts b/apps/api/src/services/data-provider/coingecko/coingecko.service.ts index bf69dbdc7..6c6d73a8c 100644 --- a/apps/api/src/services/data-provider/coingecko/coingecko.service.ts +++ b/apps/api/src/services/data-provider/coingecko/coingecko.service.ts @@ -80,7 +80,7 @@ export class CoinGeckoService implements DataProviderInterface { let message = error; if (error?.code === 'ABORT_ERR') { - message = `RequestError: The operation was aborted because the request to the data provider took more than ${this.configurationService.get( + message = `RequestError: The operation to get the asset profile for ${aSymbol} was aborted because the request to the data provider took more than ${this.configurationService.get( 'REQUEST_TIMEOUT' )}ms`; } @@ -195,7 +195,7 @@ export class CoinGeckoService implements DataProviderInterface { let message = error; if (error?.code === 'ABORT_ERR') { - message = `RequestError: The operation was aborted because the request to the data provider took more than ${this.configurationService.get( + message = `RequestError: The operation to get the quotes was aborted because the request to the data provider took more than ${this.configurationService.get( 'REQUEST_TIMEOUT' )}ms`; } @@ -242,7 +242,7 @@ export class CoinGeckoService implements DataProviderInterface { let message = error; if (error?.code === 'ABORT_ERR') { - message = `RequestError: The operation was aborted because the request to the data provider took more than ${this.configurationService.get( + message = `RequestError: The operation to search for ${query} was aborted because the request to the data provider took more than ${this.configurationService.get( 'REQUEST_TIMEOUT' )}ms`; } diff --git a/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts b/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts index bcff104c0..d9ee298be 100644 --- a/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts +++ b/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts @@ -271,7 +271,7 @@ export class EodHistoricalDataService implements DataProviderInterface { let message = error; if (error?.code === 'ABORT_ERR') { - message = `RequestError: The operation was aborted because the request to the data provider took more than ${this.configurationService.get( + message = `RequestError: The operation to get the quotes was aborted because the request to the data provider took more than ${this.configurationService.get( 'REQUEST_TIMEOUT' )}ms`; } @@ -423,7 +423,7 @@ export class EodHistoricalDataService implements DataProviderInterface { let message = error; if (error?.code === 'ABORT_ERR') { - message = `RequestError: The operation was aborted because the request to the data provider took more than ${this.configurationService.get( + message = `RequestError: The operation to search for ${aQuery} was aborted because the request to the data provider took more than ${this.configurationService.get( 'REQUEST_TIMEOUT' )}ms`; } 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 b22907559..81cb96e90 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 @@ -143,7 +143,7 @@ export class FinancialModelingPrepService implements DataProviderInterface { let message = error; if (error?.code === 'ABORT_ERR') { - message = `RequestError: The operation was aborted because the request to the data provider took more than ${this.configurationService.get( + message = `RequestError: The operation to get the quotes was aborted because the request to the data provider took more than ${this.configurationService.get( 'REQUEST_TIMEOUT' )}ms`; } @@ -192,7 +192,7 @@ export class FinancialModelingPrepService implements DataProviderInterface { let message = error; if (error?.code === 'ABORT_ERR') { - message = `RequestError: The operation was aborted because the request to the data provider took more than ${this.configurationService.get( + message = `RequestError: The operation to search for ${query} was aborted because the request to the data provider took more than ${this.configurationService.get( 'REQUEST_TIMEOUT' )}ms`; }