From 455325c3be9df8ac9c722d93c0c28d5ee89eb19c Mon Sep 17 00:00:00 2001 From: Kenrick Tandrian <60643640+KenTandrian@users.noreply.github.com> Date: Fri, 5 Sep 2025 22:23:09 +0700 Subject: [PATCH] Bugfix/data provider status component incorrectly shows "Available" on API Error (#5466) * Reorder map and catchError * Update changelog --- CHANGELOG.md | 6 ++++++ .../data-provider-status/data-provider-status.component.ts | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f74ae59d5..293b6e116 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- Fixed an issue related to the error handling in the data provider status component + ## 2.196.0 - 2025-09-04 ### Changed diff --git a/apps/client/src/app/components/data-provider-status/data-provider-status.component.ts b/apps/client/src/app/components/data-provider-status/data-provider-status.component.ts index 02cda1056..0f638961c 100644 --- a/apps/client/src/app/components/data-provider-status/data-provider-status.component.ts +++ b/apps/client/src/app/components/data-provider-status/data-provider-status.component.ts @@ -33,12 +33,12 @@ export class GfDataProviderStatusComponent implements OnDestroy, OnInit { this.status$ = this.dataService .fetchDataProviderHealth(this.dataSource) .pipe( - catchError(() => { - return of({ isHealthy: false }); - }), map(() => { return { isHealthy: true }; }), + catchError(() => { + return of({ isHealthy: false }); + }), takeUntil(this.unsubscribeSubject) ); }