From 8f7826ced2bdb9368885cf144e026dfb0c3b44f9 Mon Sep 17 00:00:00 2001 From: Bohdan Odintsov Date: Wed, 12 Nov 2025 15:21:09 +0200 Subject: [PATCH 1/2] fix(files): Fix empty when error from files provider --- src/app/features/files/store/files.state.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/features/files/store/files.state.ts b/src/app/features/files/store/files.state.ts index b9d718298..7a6ca3169 100644 --- a/src/app/features/files/store/files.state.ts +++ b/src/app/features/files/store/files.state.ts @@ -64,7 +64,15 @@ export class FilesState { isAnonymous: response.meta?.anonymous ?? false, }); }), - catchError((error) => handleSectionError(ctx, 'files', error)) + catchError((error) => + of([]).pipe( + tap(() => + ctx.patchState({ + files: { data: [], isLoading: false, error, totalCount: 0 }, + }) + ) + ) + ) ); } From f9073baac461ef9f83d50f8b59fa02ed58944520 Mon Sep 17 00:00:00 2001 From: Bohdan Odintsov Date: Wed, 12 Nov 2025 17:06:37 +0200 Subject: [PATCH 2/2] fix(files): Set to default state of files --- src/app/features/files/store/files.state.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/app/features/files/store/files.state.ts b/src/app/features/files/store/files.state.ts index 7a6ca3169..306c69598 100644 --- a/src/app/features/files/store/files.state.ts +++ b/src/app/features/files/store/files.state.ts @@ -64,15 +64,10 @@ export class FilesState { isAnonymous: response.meta?.anonymous ?? false, }); }), - catchError((error) => - of([]).pipe( - tap(() => - ctx.patchState({ - files: { data: [], isLoading: false, error, totalCount: 0 }, - }) - ) - ) - ) + catchError((error) => { + ctx.patchState({ files: FILES_STATE_DEFAULTS.files }); + return handleSectionError(ctx, 'files', error); + }) ); }