From ddfa60dfe262b1e0bc321b23a908762a8b2efb31 Mon Sep 17 00:00:00 2001 From: Kenrick Tandrian <60643640+KenTandrian@users.noreply.github.com> Date: Sun, 5 Apr 2026 09:51:18 +0000 Subject: [PATCH] feat(client): implement HttpErrorResponse type --- .../create-or-update-access-dialog.component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts index 06cfa7a84..d0ff2d2d9 100644 --- a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts +++ b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts @@ -3,6 +3,7 @@ import { validateObjectForForm } from '@ghostfolio/common/utils'; import { NotificationService } from '@ghostfolio/ui/notifications'; import { DataService } from '@ghostfolio/ui/services'; +import type { HttpErrorResponse } from '@angular/common/http'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -133,7 +134,7 @@ export class GfCreateOrUpdateAccessDialogComponent implements OnInit { this.dataService .postAccess(access) .pipe( - catchError((error) => { + catchError((error: HttpErrorResponse) => { if (error.status === StatusCodes.BAD_REQUEST) { this.notificationService.alert({ title: $localize`Oops! Could not grant access.` @@ -170,8 +171,8 @@ export class GfCreateOrUpdateAccessDialogComponent implements OnInit { this.dataService .putAccess(access) .pipe( - catchError(({ status }) => { - if (status.status === StatusCodes.BAD_REQUEST) { + catchError(({ status }: HttpErrorResponse) => { + if (status === StatusCodes.BAD_REQUEST) { this.notificationService.alert({ title: $localize`Oops! Could not update access.` });