Browse Source
Task/add error logging to symbol lookup in Trackinsight data enhancer (#5872)
* Add error logging
* Update changelog
pull/5874/head
Thomas Kaul
1 day ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
8 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts
|
|
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
### Added |
|
|
|
|
|
|
|
- Extended the activities table menu with a _View Holding_ item |
|
|
|
- Added the error logging to the symbol lookup in the _Trackinsight_ data enhancer |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
|
|
|
|
@ -4,7 +4,7 @@ import { Holding } from '@ghostfolio/common/interfaces'; |
|
|
|
import { Country } from '@ghostfolio/common/interfaces/country.interface'; |
|
|
|
import { Sector } from '@ghostfolio/common/interfaces/sector.interface'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { Injectable, Logger } from '@nestjs/common'; |
|
|
|
import { SymbolProfile } from '@prisma/client'; |
|
|
|
import { countries } from 'countries-list'; |
|
|
|
|
|
|
|
@ -202,7 +202,12 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface { |
|
|
|
|
|
|
|
return undefined; |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
.catch(({ message }) => { |
|
|
|
Logger.error( |
|
|
|
`Failed to search Trackinsight symbol for ${symbol} (${message})`, |
|
|
|
'TrackinsightDataEnhancerService' |
|
|
|
); |
|
|
|
|
|
|
|
return undefined; |
|
|
|
}); |
|
|
|
} |
|
|
|
|