From fb44933c9cd168b34e90a83eceeaf44cf6f9a61b Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:21:32 +0200 Subject: [PATCH] Feature/improve error logs in scraper configuration test (#3730) * Improve error logs * Update changelog --- CHANGELOG.md | 1 + apps/api/src/app/admin/admin.controller.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4639d2485..448e1c5a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Changed the data format of the environment variable `CACHE_QUOTES_TTL` from seconds to milliseconds - Changed the data format of the environment variable `CACHE_TTL` from seconds to milliseconds - Removed the environment variable `MAX_ITEM_IN_CACHE` +- Improved the error logs of the scraper configuration test in the asset profile details dialog of the admin control - Improved the language localization for Polish (`pl`) - Migrated from `cache-manager-redis-store` to `cache-manager-redis-yet` - Upgraded `cache-manager` from version `3.4.3` to `5.7.6` diff --git a/apps/api/src/app/admin/admin.controller.ts b/apps/api/src/app/admin/admin.controller.ts index 69e6955c1..6d201be23 100644 --- a/apps/api/src/app/admin/admin.controller.ts +++ b/apps/api/src/app/admin/admin.controller.ts @@ -239,9 +239,11 @@ export class AdminController { return { price }; } - throw new Error('Could not parse the current market price'); + throw new Error( + `Could not parse the current market price for ${symbol} (${dataSource})` + ); } catch (error) { - Logger.error(error); + Logger.error(error, 'AdminController'); throw new HttpException(error.message, StatusCodes.BAD_REQUEST); }