From bbbd974be64f4f88d494c3e9ab9eecce8f35358e Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 2 Jan 2025 06:35:11 +0100 Subject: [PATCH] Bugfix/improve handling of missing url in logo service (#4171) * Improve handling of missing url * Update changelog --- CHANGELOG.md | 4 ++++ apps/api/src/app/logo/logo.service.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aa7a13b4..b2b66f56c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the language localization for German (`de`) - Refreshed the cryptocurrencies list +### Fixed + +- Improved the handling of a missing url in the endpoint to fetch the logo of an asset or a platform + ## 2.132.0 - 2024-12-30 ### Added diff --git a/apps/api/src/app/logo/logo.service.ts b/apps/api/src/app/logo/logo.service.ts index 584f50cab..d245faa29 100644 --- a/apps/api/src/app/logo/logo.service.ts +++ b/apps/api/src/app/logo/logo.service.ts @@ -28,7 +28,7 @@ export class LogoService { { dataSource, symbol } ]); - if (!assetProfile) { + if (!assetProfile?.url) { throw new HttpException( getReasonPhrase(StatusCodes.NOT_FOUND), StatusCodes.NOT_FOUND