From ad85f05e9067df76c651347ca5279197436f2efc Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Thu, 23 May 2024 12:58:50 +0200
Subject: [PATCH] OZG-5708 rename function in order to avoid ambiguity

---
 .../src/lib/bescheid.service.ts               | 10 +++---
 .../src/lib/+state/command.effects.ts         | 15 +++++---
 .../src/lib/command.util.spec.ts              |  8 ++---
 .../command-shared/src/lib/command.util.ts    |  4 +--
 .../src/lib/forwarding.service.ts             |  8 ++---
 .../src/lib/postfach.service.ts               |  4 +--
 ...ostfach-mail-button-container.component.ts |  9 +++--
 .../lib/resource/resource.rxjs.operator.ts    |  5 +--
 .../src/lib/resource/resource.util.ts         |  4 +--
 .../src/lib/service/formservice.abstract.ts   |  4 +--
 .../src/lib/user-icon/user-icon.component.ts  | 10 +++---
 .../user-profile-in-vorgang.component.ts      |  9 +++--
 ...aktenzeichen-edit-dialog.component.spec.ts | 36 +++++++++----------
 .../aktenzeichen-edit-dialog.component.ts     | 14 ++++----
 ...bescheiden-result-attachments.component.ts |  4 +--
 ...tail-bescheiden-steps-content.component.ts |  9 +++--
 .../src/lib/wiedervorlage.service.ts          |  4 +--
 17 files changed, 88 insertions(+), 69 deletions(-)

diff --git a/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.ts b/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.ts
index 1bb8e64482..05a83a1c48 100644
--- a/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.ts
+++ b/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.ts
@@ -19,7 +19,7 @@ import {
   createStateResource,
   filterIsLoadedOrHasError,
   getEmbeddedResources,
-  hasError,
+  hasStateResourceError,
   isLoaded,
   isNotEmpty,
   sortByGermanDateStr,
@@ -353,7 +353,7 @@ export class BescheidService {
     bescheid: BescheidResource,
     binaryFileStateResource: StateResource<BinaryFileResource>,
   ): void {
-    if (hasError(binaryFileStateResource)) {
+    if (hasStateResourceError(binaryFileStateResource)) {
       this.setUploadBescheidDocumentInProgressError(binaryFileStateResource.error);
     } else {
       this.createBescheidDocumentFromFile(bescheid, binaryFileStateResource.resource);
@@ -373,7 +373,7 @@ export class BescheidService {
     commandStateResource: StateResource<CommandResource>,
     binaryFile: BinaryFileResource,
   ): void {
-    if (hasError(commandStateResource)) {
+    if (hasStateResourceError(commandStateResource)) {
       this.setUploadBescheidDocumentInProgressError(commandStateResource.error);
     } else {
       this.bescheidDocument$.next(createEmptyStateResource());
@@ -425,7 +425,7 @@ export class BescheidService {
   private handleCreateBescheidDocumentResponse(
     commandStateResource: StateResource<CommandResource>,
   ): void {
-    if (hasError(commandStateResource)) {
+    if (hasStateResourceError(commandStateResource)) {
       this.setCreateBescheidDocumentInProgressError(commandStateResource.error);
     } else {
       const documentUri: ResourceUri = getEffectedResourceUrl(commandStateResource.resource);
@@ -546,7 +546,7 @@ export class BescheidService {
   }
 
   handleAttachmentUpload(binaryFileStateResource: StateResource<BinaryFileResource>) {
-    if (hasError(binaryFileStateResource)) {
+    if (hasStateResourceError(binaryFileStateResource)) {
       this.uploadAttachmentInProgress$.next({
         loading: false,
         error: binaryFileStateResource.error,
diff --git a/alfa-client/libs/command-shared/src/lib/+state/command.effects.ts b/alfa-client/libs/command-shared/src/lib/+state/command.effects.ts
index d9521a3ab9..e2216c9de0 100644
--- a/alfa-client/libs/command-shared/src/lib/+state/command.effects.ts
+++ b/alfa-client/libs/command-shared/src/lib/+state/command.effects.ts
@@ -1,14 +1,21 @@
-import { Injectable } from '@angular/core';
+import { EMPTY_STRING } from '@alfa-client/tech-shared';
 import { SnackBarService } from '@alfa-client/ui';
+import { Injectable } from '@angular/core';
 import { Actions, createEffect, ofType } from '@ngrx/effects';
 import { Store } from '@ngrx/store';
 import { TypedAction } from '@ngrx/store/src/models';
+import { isEqual, isUndefined } from 'lodash-es';
 import { of } from 'rxjs';
 import { catchError, delay, map, mergeMap, switchMap, tap } from 'rxjs/operators';
 import { COMMAND_ERROR_MESSAGES, CREATE_COMMAND_MESSAGE_BY_ORDER } from '../command.message';
 import { CommandListResource, CommandResource, CreateCommandProps } from '../command.model';
 import { CommandRepository } from '../command.repository';
-import { hasError, isConcurrentModification, isPending, isRevokeable } from '../command.util';
+import {
+  hasCommandError,
+  isConcurrentModification,
+  isPending,
+  isRevokeable,
+} from '../command.util';
 import {
   CommandProps,
   LoadCommandListProps,
@@ -27,8 +34,6 @@ import {
   showRevokeSnackbar,
   showSnackbar,
 } from './command.actions';
-import { isEqual, isUndefined } from 'lodash-es';
-import { EMPTY_STRING } from '@alfa-client/tech-shared';
 
 @Injectable()
 export class CommandEffects {
@@ -97,7 +102,7 @@ export class CommandEffects {
     if (isRevokeable(command)) {
       return [createCommandSuccess({ command }), showRevokeSnackbar({ command })];
     }
-    if (hasError(command) && isConcurrentModification(command.errorMessage)) {
+    if (hasCommandError(command) && isConcurrentModification(command.errorMessage)) {
       this.showError(command);
       return [createCommandSuccess({ command }), publishConcurrentModificationAction()];
     }
diff --git a/alfa-client/libs/command-shared/src/lib/command.util.spec.ts b/alfa-client/libs/command-shared/src/lib/command.util.spec.ts
index cd3f65d6bd..7567dbc61f 100644
--- a/alfa-client/libs/command-shared/src/lib/command.util.spec.ts
+++ b/alfa-client/libs/command-shared/src/lib/command.util.spec.ts
@@ -31,7 +31,7 @@ import { CommandErrorMessage } from './command.message';
 import { CommandListResource, CommandResource } from './command.model';
 import {
   getPendingCommandByOrder,
-  hasError,
+  hasCommandError,
   isConcurrentModification,
   isDone,
   isPending,
@@ -81,19 +81,19 @@ describe('CommandUtil', () => {
 
   describe('hasError', () => {
     it('should be true if no update link is present and command has error message', () => {
-      const result = hasError(createCommandErrorResource());
+      const result = hasCommandError(createCommandErrorResource());
 
       expect(result).toBeTruthy();
     });
 
     it('should be false if update link is present', () => {
-      const result = hasError(createCommandResource([CommandLinkRel.UPDATE]));
+      const result = hasCommandError(createCommandResource([CommandLinkRel.UPDATE]));
 
       expect(result).toBeFalsy();
     });
 
     it('should be false if error message is not present', () => {
-      const result = hasError(createCommandResource());
+      const result = hasCommandError(createCommandResource());
 
       expect(result).toBeFalsy();
     });
diff --git a/alfa-client/libs/command-shared/src/lib/command.util.ts b/alfa-client/libs/command-shared/src/lib/command.util.ts
index 8132a7d316..2dc64f425d 100644
--- a/alfa-client/libs/command-shared/src/lib/command.util.ts
+++ b/alfa-client/libs/command-shared/src/lib/command.util.ts
@@ -43,7 +43,7 @@ export function hasErrorMessage(commandResource: CommandResource): boolean {
   return !isNil(commandResource.errorMessage) && !isEmpty(commandResource.errorMessage);
 }
 
-export function hasError(commandResource: CommandResource): boolean {
+export function hasCommandError(commandResource: CommandResource): boolean {
   return hasErrorMessage(commandResource) && !isPending(commandResource);
 }
 
@@ -73,7 +73,7 @@ export function isConcurrentModification(errorMessage: string): boolean {
 }
 
 export function isSuccessfulDone(commandResource: CommandResource): boolean {
-  return isDone(commandResource) && !hasError(commandResource);
+  return isDone(commandResource) && !hasCommandError(commandResource);
 }
 
 export function getEffectedResourceUrl(command: CommandResource): ResourceUri {
diff --git a/alfa-client/libs/forwarding-shared/src/lib/forwarding.service.ts b/alfa-client/libs/forwarding-shared/src/lib/forwarding.service.ts
index c425ea44e5..fd5032a426 100644
--- a/alfa-client/libs/forwarding-shared/src/lib/forwarding.service.ts
+++ b/alfa-client/libs/forwarding-shared/src/lib/forwarding.service.ts
@@ -21,8 +21,6 @@
  * Die sprachspezifischen Genehmigungen und Beschränkungen
  * unter der Lizenz sind dem Lizenztext zu entnehmen.
  */
-import { Injectable, OnDestroy } from '@angular/core';
-import { Params } from '@angular/router';
 import {
   CommandResource,
   CommandService,
@@ -35,7 +33,7 @@ import {
   StateResource,
   createEmptyStateResource,
   createStateResource,
-  hasError,
+  hasStateResourceError,
 } from '@alfa-client/tech-shared';
 import {
   ForwardRequest,
@@ -45,6 +43,8 @@ import {
   VorgangWithEingangResource,
   createForwardCommand,
 } from '@alfa-client/vorgang-shared';
+import { Injectable, OnDestroy } from '@angular/core';
+import { Params } from '@angular/router';
 import { isNil } from 'lodash-es';
 import { BehaviorSubject, Observable, Subscription } from 'rxjs';
 import { first, map, startWith, tap } from 'rxjs/operators';
@@ -162,7 +162,7 @@ export class ForwardingService implements OnDestroy {
   }
 
   reloadCurrentVorgang(command: StateResource<CommandResource>): void {
-    if (!hasError(command)) {
+    if (!hasStateResourceError(command)) {
       this.vorgangService.reloadCurrentVorgang();
     }
   }
diff --git a/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts b/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts
index dec067e551..f4bc26e468 100644
--- a/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts
+++ b/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts
@@ -31,7 +31,7 @@ import {
   CommandResource,
   CommandService,
   doIfCommandIsDone,
-  hasError,
+  hasCommandError,
   isDone,
   isPending,
 } from '@alfa-client/command-shared';
@@ -152,7 +152,7 @@ export class PostfachService {
   }
 
   private showSnackbar(commandResource: CommandResource): void {
-    if (hasError(commandResource)) {
+    if (hasCommandError(commandResource)) {
       this.snackbarService.showError(PostfachMessages.SEND_FAILED);
     } else {
       this.snackbarService.show(commandResource, PostfachMessages.SEND_SUCCESSFUL);
diff --git a/alfa-client/libs/postfach/src/lib/postfach-mail-button-container/postfach-mail-button-container.component.ts b/alfa-client/libs/postfach/src/lib/postfach-mail-button-container/postfach-mail-button-container.component.ts
index 6a4d16d49c..3982398bb0 100644
--- a/alfa-client/libs/postfach/src/lib/postfach-mail-button-container/postfach-mail-button-container.component.ts
+++ b/alfa-client/libs/postfach/src/lib/postfach-mail-button-container/postfach-mail-button-container.component.ts
@@ -28,7 +28,12 @@ import {
   PostfachMailListResource,
   PostfachService,
 } from '@alfa-client/postfach-shared';
-import { StateResource, hasError, isNotNull, isNotUndefined } from '@alfa-client/tech-shared';
+import {
+  StateResource,
+  hasStateResourceError,
+  isNotNull,
+  isNotUndefined,
+} from '@alfa-client/tech-shared';
 import { DialogService, FixedDialogComponent } from '@alfa-client/ui';
 import { VorgangHeaderLinkRel, VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
 import { getEmpfaenger } from '@alfa-client/vorgang-shared-ui';
@@ -89,7 +94,7 @@ export class PostfachMailButtonContainerComponent {
 
   closeDialog(commandStateResource: StateResource<CommandResource>): void {
     if (
-      !hasError(commandStateResource) &&
+      !hasStateResourceError(commandStateResource) &&
       commandStateResource.loaded &&
       isNotUndefined(this.dialogRef)
     ) {
diff --git a/alfa-client/libs/tech-shared/src/lib/resource/resource.rxjs.operator.ts b/alfa-client/libs/tech-shared/src/lib/resource/resource.rxjs.operator.ts
index b7bc23b173..94366fd512 100644
--- a/alfa-client/libs/tech-shared/src/lib/resource/resource.rxjs.operator.ts
+++ b/alfa-client/libs/tech-shared/src/lib/resource/resource.rxjs.operator.ts
@@ -1,6 +1,6 @@
 import { Resource } from '@ngxp/rest';
 import { Observable, filter, map } from 'rxjs';
-import { StateResource, hasError, isLoaded } from './resource.util';
+import { StateResource, hasStateResourceError, isLoaded } from './resource.util';
 
 export function filterIsLoadedOrHasError<T>(): (
   source: Observable<StateResource<T>>,
@@ -8,7 +8,8 @@ export function filterIsLoadedOrHasError<T>(): (
   return (source: Observable<StateResource<T>>): Observable<StateResource<T>> => {
     return source.pipe(
       filter(
-        (stateResource: StateResource<T>) => hasError(stateResource) || isLoaded(stateResource),
+        (stateResource: StateResource<T>) =>
+          hasStateResourceError(stateResource) || isLoaded(stateResource),
       ),
     );
   };
diff --git a/alfa-client/libs/tech-shared/src/lib/resource/resource.util.ts b/alfa-client/libs/tech-shared/src/lib/resource/resource.util.ts
index deaa71132a..17394d5b91 100644
--- a/alfa-client/libs/tech-shared/src/lib/resource/resource.util.ts
+++ b/alfa-client/libs/tech-shared/src/lib/resource/resource.util.ts
@@ -69,7 +69,7 @@ export function isLoaded<T>(stateResource: StateResource<T>): boolean {
   return !stateResource.loading && !stateResource.reload && isNotNull(stateResource.resource);
 }
 
-export function hasError(stateResource: StateResource<any>): boolean {
+export function hasStateResourceError(stateResource: StateResource<any>): boolean {
   return !isNil(stateResource.error);
 }
 
@@ -115,7 +115,7 @@ export function getSuccessfullyLoaded<T extends Resource>(
   stateResources: StateResource<T>[],
 ): StateResource<T>[] {
   return stateResources.filter(
-    (stateResource) => isLoaded(stateResource) && !hasError(stateResource),
+    (stateResource) => isLoaded(stateResource) && !hasStateResourceError(stateResource),
   );
 }
 
diff --git a/alfa-client/libs/tech-shared/src/lib/service/formservice.abstract.ts b/alfa-client/libs/tech-shared/src/lib/service/formservice.abstract.ts
index 753c742264..a02d2bab0a 100644
--- a/alfa-client/libs/tech-shared/src/lib/service/formservice.abstract.ts
+++ b/alfa-client/libs/tech-shared/src/lib/service/formservice.abstract.ts
@@ -27,7 +27,7 @@ import { Resource } from '@ngxp/rest';
 import { isNil } from 'lodash-es';
 import { Observable } from 'rxjs';
 import { map } from 'rxjs/operators';
-import { StateResource, hasError } from '../resource/resource.util';
+import { StateResource, hasStateResourceError } from '../resource/resource.util';
 import { ApiError, HttpError, InvalidParam, Issue, ProblemDetail } from '../tech.model';
 import { isNotUndefined } from '../tech.util';
 import {
@@ -56,7 +56,7 @@ export abstract class AbstractFormService {
 
   handleResponse(result: StateResource<Resource | HttpError>): StateResource<Resource | HttpError> {
     if (result.loading) return result;
-    if (hasError(result)) {
+    if (hasStateResourceError(result)) {
       this.handleError(result.error);
     }
     return result;
diff --git a/alfa-client/libs/user-profile/src/lib/user-icon/user-icon.component.ts b/alfa-client/libs/user-profile/src/lib/user-icon/user-icon.component.ts
index 78547141a5..d5950ae478 100644
--- a/alfa-client/libs/user-profile/src/lib/user-icon/user-icon.component.ts
+++ b/alfa-client/libs/user-profile/src/lib/user-icon/user-icon.component.ts
@@ -21,20 +21,20 @@
  * Die sprachspezifischen Genehmigungen und Beschränkungen
  * unter der Lizenz sind dem Lizenztext zu entnehmen.
  */
-import { Component, Input, SimpleChanges } from '@angular/core';
 import {
   ApiError,
-  createEmptyStateResource,
-  hasError,
   MessageCode,
   StateResource,
+  createEmptyStateResource,
+  hasStateResourceError,
 } from '@alfa-client/tech-shared';
 import {
+  UserProfileResource,
   getUserName,
   getUserNameInitials,
   userProfileMessage,
-  UserProfileResource,
 } from '@alfa-client/user-profile-shared';
+import { Component, Input, SimpleChanges } from '@angular/core';
 import { isUndefined } from 'lodash-es';
 
 @Component({
@@ -61,7 +61,7 @@ export class UserIconComponent {
     if (this.userProfileStateResource.resource) {
       return this.getUserTooltip();
     }
-    if (hasError(this.userProfileStateResource)) {
+    if (hasStateResourceError(this.userProfileStateResource)) {
       return this.getErrorTooltip();
     }
     return userProfileMessage.UNASSIGNED;
diff --git a/alfa-client/libs/user-profile/src/lib/user-profile-in-vorgang-container/user-profile-in-vorgang/user-profile-in-vorgang.component.ts b/alfa-client/libs/user-profile/src/lib/user-profile-in-vorgang-container/user-profile-in-vorgang/user-profile-in-vorgang.component.ts
index 4a93a23e00..eb11e7b7c1 100644
--- a/alfa-client/libs/user-profile/src/lib/user-profile-in-vorgang-container/user-profile-in-vorgang/user-profile-in-vorgang.component.ts
+++ b/alfa-client/libs/user-profile/src/lib/user-profile-in-vorgang-container/user-profile-in-vorgang/user-profile-in-vorgang.component.ts
@@ -21,16 +21,16 @@
  * Die sprachspezifischen Genehmigungen und Beschränkungen
  * unter der Lizenz sind dem Lizenztext zu entnehmen.
  */
-import { Component, Input } from '@angular/core';
 import {
   ApiError,
   StateResource,
   createEmptyStateResource,
-  hasError,
+  hasStateResourceError,
   isServiceUnavailableMessageCode,
 } from '@alfa-client/tech-shared';
 import { UserProfileResource } from '@alfa-client/user-profile-shared';
 import { VorgangWithEingangLinkRel, VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
+import { Component, Input } from '@angular/core';
 import { Resource } from '@ngxp/rest';
 
 @Component({
@@ -46,7 +46,10 @@ export class UserProfileInVorgangComponent {
   readonly vorgangLinkRel = VorgangWithEingangLinkRel;
 
   public isUserServiceAvailable(stateResource: StateResource<Resource>): boolean {
-    if (hasError(stateResource) && isServiceUnavailableMessageCode(<ApiError>stateResource.error)) {
+    if (
+      hasStateResourceError(stateResource) &&
+      isServiceUnavailableMessageCode(<ApiError>stateResource.error)
+    ) {
       return false;
     }
     return true;
diff --git a/alfa-client/libs/vorgang-detail/src/lib/aktenzeichen-edit-dialog/aktenzeichen-edit-dialog.component.spec.ts b/alfa-client/libs/vorgang-detail/src/lib/aktenzeichen-edit-dialog/aktenzeichen-edit-dialog.component.spec.ts
index 9048ea218b..44d6d7f627 100644
--- a/alfa-client/libs/vorgang-detail/src/lib/aktenzeichen-edit-dialog/aktenzeichen-edit-dialog.component.spec.ts
+++ b/alfa-client/libs/vorgang-detail/src/lib/aktenzeichen-edit-dialog/aktenzeichen-edit-dialog.component.spec.ts
@@ -1,5 +1,14 @@
-import { AktenzeichenEditDialogComponent } from '@alfa-client/vorgang-detail';
-import { ComponentFixture, TestBed } from '@angular/core/testing';
+import {
+  COMMAND_ERROR_MESSAGES,
+  CommandErrorMessage,
+  hasCommandError,
+  isSuccessfulDone,
+} from '@alfa-client/command-shared';
+import {
+  createEmptyStateResource,
+  hasContent,
+  isClipboardReadSupported,
+} from '@alfa-client/tech-shared';
 import { mock } from '@alfa-client/test-utils';
 import {
   OzgcloudPasteTextButtonComponent,
@@ -7,8 +16,10 @@ import {
   SnackBarService,
   TextEditorComponent,
 } from '@alfa-client/ui';
-import { MockComponent, MockDirective } from 'ng-mocks';
+import { AktenzeichenEditDialogComponent } from '@alfa-client/vorgang-detail';
 import { VorgangService } from '@alfa-client/vorgang-shared';
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { FormBuilder, ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
 import {
   MAT_DIALOG_DATA,
   MatDialogActions,
@@ -16,32 +27,21 @@ import {
   MatDialogRef,
 } from '@angular/material/dialog';
 import { MatIcon } from '@angular/material/icon';
+import { cold, hot } from 'jest-marbles';
 import { createVorgangWithEingangResource } from 'libs/vorgang-shared/test/vorgang';
-import {
-  createEmptyStateResource,
-  hasContent,
-  isClipboardReadSupported,
-} from '@alfa-client/tech-shared';
+import { MockComponent, MockDirective } from 'ng-mocks';
 import { EMPTY, NEVER } from 'rxjs';
-import { FormBuilder, ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
-import { cold, hot } from 'jest-marbles';
 import {
   createCommandErrorResource,
   createCommandResource,
 } from '../../../../command-shared/test/command';
-import {
-  COMMAND_ERROR_MESSAGES,
-  CommandErrorMessage,
-  hasError,
-  isSuccessfulDone,
-} from '@alfa-client/command-shared';
-import { AktenzeichenEditDialogMessages } from './aktenzeichen-edit-dialog.message';
 import { AktenzeichenEditDialogFormservice } from './aktenzeichen-edit-dialog.formservice';
+import { AktenzeichenEditDialogMessages } from './aktenzeichen-edit-dialog.message';
 
 jest.mock('@alfa-client/tech-shared');
 const isClipboardReadSupportedMock = isClipboardReadSupported as jest.Mock;
 jest.mock('@alfa-client/command-shared');
-const hasErrorMock = hasError as jest.Mock;
+const hasErrorMock = hasCommandError as jest.Mock;
 const isSuccessfulDoneMock = isSuccessfulDone as jest.Mock;
 const hasContentMock = hasContent as jest.Mock;
 const createEmptyStateResourceMock = createEmptyStateResource as jest.Mock;
diff --git a/alfa-client/libs/vorgang-detail/src/lib/aktenzeichen-edit-dialog/aktenzeichen-edit-dialog.component.ts b/alfa-client/libs/vorgang-detail/src/lib/aktenzeichen-edit-dialog/aktenzeichen-edit-dialog.component.ts
index 0ce392d569..4f43dc0520 100644
--- a/alfa-client/libs/vorgang-detail/src/lib/aktenzeichen-edit-dialog/aktenzeichen-edit-dialog.component.ts
+++ b/alfa-client/libs/vorgang-detail/src/lib/aktenzeichen-edit-dialog/aktenzeichen-edit-dialog.component.ts
@@ -1,24 +1,24 @@
 import {
   COMMAND_ERROR_MESSAGES,
   CommandResource,
-  hasError,
+  hasCommandError,
   isSuccessfulDone,
 } from '@alfa-client/command-shared';
 import {
+  StateResource,
   createEmptyStateResource,
   hasContent,
   isClipboardReadSupported,
-  StateResource,
 } from '@alfa-client/tech-shared';
 import { SnackBarService } from '@alfa-client/ui';
 import { VorgangService, VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
 import { Component, Inject, OnInit } from '@angular/core';
+import { UntypedFormGroup } from '@angular/forms';
 import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
-import { map, Observable, of, startWith, tap } from 'rxjs';
+import { Observable, map, of, startWith, tap } from 'rxjs';
 import { AktenzeichenEditDialogData } from './aktenzeichen-edit-dialog.data';
-import { AktenzeichenEditDialogMessages } from './aktenzeichen-edit-dialog.message';
-import { UntypedFormGroup } from '@angular/forms';
 import { AktenzeichenEditDialogFormservice } from './aktenzeichen-edit-dialog.formservice';
+import { AktenzeichenEditDialogMessages } from './aktenzeichen-edit-dialog.message';
 
 @Component({
   selector: 'alfa-aktenzeichen-edit-dialog',
@@ -73,7 +73,7 @@ export class AktenzeichenEditDialogComponent implements OnInit {
   }
 
   onResponse(commandResource: CommandResource) {
-    if (commandResource && hasError(commandResource)) {
+    if (commandResource && hasCommandError(commandResource)) {
       this.showSnackbar(commandResource);
     } else if (isSuccessfulDone(commandResource)) {
       this.vorgangService.reloadCurrentVorgang();
@@ -82,7 +82,7 @@ export class AktenzeichenEditDialogComponent implements OnInit {
   }
 
   showSnackbar(commandResource: CommandResource): void {
-    if (hasError(commandResource)) {
+    if (hasCommandError(commandResource)) {
       this.snackBarService.showError(this.getErrorMessage(commandResource));
     }
   }
diff --git a/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-result/vorgang-detail-bescheiden-result-attachments/vorgang-detail-bescheiden-result-attachments.component.ts b/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-result/vorgang-detail-bescheiden-result-attachments/vorgang-detail-bescheiden-result-attachments.component.ts
index 2fc7831dfd..084a5361b9 100644
--- a/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-result/vorgang-detail-bescheiden-result-attachments/vorgang-detail-bescheiden-result-attachments.component.ts
+++ b/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-result/vorgang-detail-bescheiden-result-attachments/vorgang-detail-bescheiden-result-attachments.component.ts
@@ -4,7 +4,7 @@ import {
   StateResource,
   containsLoading,
   getSuccessfullyLoaded,
-  hasError,
+  hasStateResourceError,
   isLoaded,
   isNotNil,
 } from '@alfa-client/tech-shared';
@@ -65,7 +65,7 @@ export class VorgangDetailBescheidenResultAttachmentsComponent implements OnDest
   buildUploadedAttachments(
     uploadStateResource: StateResource<BinaryFileResource>,
   ): StateResource<BinaryFileResource>[] {
-    if (isLoaded(uploadStateResource) || hasError(uploadStateResource)) {
+    if (isLoaded(uploadStateResource) || hasStateResourceError(uploadStateResource)) {
       return [...getSuccessfullyLoaded(this.uploadedAttachments), uploadStateResource];
     } else if (uploadStateResource.loading && !containsLoading(this.uploadedAttachments)) {
       return [...getSuccessfullyLoaded(this.uploadedAttachments), uploadStateResource];
diff --git a/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-steps/vorgang-detail-bescheiden-steps-content/vorgang-detail-bescheiden-steps-content.component.ts b/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-steps/vorgang-detail-bescheiden-steps-content/vorgang-detail-bescheiden-steps-content.component.ts
index 8bb8b9b2cd..969f523ee3 100644
--- a/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-steps/vorgang-detail-bescheiden-steps-content/vorgang-detail-bescheiden-steps-content.component.ts
+++ b/alfa-client/libs/vorgang-detail/src/lib/vorgang-detail-page/vorgang-detail-bescheiden/vorgang-detail-bescheiden-steps/vorgang-detail-bescheiden-steps-content/vorgang-detail-bescheiden-steps-content.component.ts
@@ -1,4 +1,9 @@
-import { HttpError, StateResource, hasError, isLoaded } from '@alfa-client/tech-shared';
+import {
+  HttpError,
+  StateResource,
+  hasStateResourceError,
+  isLoaded,
+} from '@alfa-client/tech-shared';
 import {
   VorgangService,
   VorgangWithEingangLinkRel,
@@ -61,6 +66,6 @@ export class VorgangDetailBescheidenStepsContentComponent implements OnInit {
   }
 
   noError(stateResource: StateResource<Resource | HttpError>): boolean {
-    return isLoaded(stateResource) && !hasError(stateResource);
+    return isLoaded(stateResource) && !hasStateResourceError(stateResource);
   }
 }
diff --git a/alfa-client/libs/wiedervorlage-shared/src/lib/wiedervorlage.service.ts b/alfa-client/libs/wiedervorlage-shared/src/lib/wiedervorlage.service.ts
index a96d7ca4e7..c9633abfed 100644
--- a/alfa-client/libs/wiedervorlage-shared/src/lib/wiedervorlage.service.ts
+++ b/alfa-client/libs/wiedervorlage-shared/src/lib/wiedervorlage.service.ts
@@ -37,7 +37,7 @@ import {
   createStateResource,
   decodeUrlFromEmbedding,
   doIfLoadingRequired,
-  hasError,
+  hasStateResourceError,
   isNotNull,
   isNotUndefined,
   replacePlaceholder,
@@ -327,7 +327,7 @@ export class WiedervorlageService implements OnDestroy {
       this.submitInProgress$.next(createStateResource(commandStateResource.resource));
       this.snackbarService.show(commandStateResource.resource, message);
       this.setWiedervorlageListReload();
-    } else if (hasError(commandStateResource)) {
+    } else if (hasStateResourceError(commandStateResource)) {
       this.submitInProgress$.next(createStateResource(commandStateResource.resource));
     }
   }
-- 
GitLab