rfellows commented on code in PR #8349:
URL: https://github.com/apache/nifi/pull/8349#discussion_r1478548444


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/state/registry-clients/registry-clients.effects.ts:
##########
@@ -145,6 +151,22 @@ export class RegistryClientsEffects {
         )
     );
 
+    flowAnalysisRuleBannerApiError$ = createEffect(() =>

Review Comment:
   rename this to something like `registryClientBannerApiError$`



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/state/general/general.effects.ts:
##########
@@ -43,13 +52,17 @@ export class GeneralEffects {
                             }
                         })
                     ),
-                    catchError((error) =>
-                        of(
-                            GeneralActions.controllerConfigApiError({
-                                error: error.error
-                            })
-                        )
-                    )
+                    catchError((errorResponse: HttpErrorResponse) => {
+                        if (status === 'success') {
+                            if 
(this.errorHelper.showErrorInContext(errorResponse.status)) {
+                                return of(ErrorActions.snackBarError({ error: 
errorResponse.error }));
+                            } else {
+                                return 
of(this.errorHelper.fullScreenError(errorResponse));
+                            }
+                        } else {
+                            return 
of(this.errorHelper.fullScreenError(errorResponse));
+                        }
+                    })

Review Comment:
   I wonder at what point do we just want to add this to the error helper to be 
used everywhere rather than duplicating it?



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/state/reporting-tasks/reporting-tasks.effects.ts:
##########
@@ -302,10 +325,10 @@ export class ReportingTasksEffects {
                             }
                         })
                     ),
-                    catchError((error) =>
+                    catchError((errorResponse: HttpErrorResponse) =>
                         of(
-                            ReportingTaskActions.reportingTasksApiError({
-                                error: error.error
+                            ReportingTaskActions.reportingTasksBannerApiError({
+                                error: errorResponse.error

Review Comment:
   This banner error needs cleaned up when the dialog closes.
   
   ```
   this.store.dispatch(ErrorActions.clearBannerErrors());



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/state/registry-clients/registry-clients.effects.ts:
##########
@@ -252,7 +274,7 @@ export class RegistryClientsEffects {
                     ),
                     catchError((error) =>
                         of(
-                            RegistryClientsActions.registryClientsApiError({
+                            
RegistryClientsActions.registryClientsBannerApiError({

Review Comment:
   This banner error needs cleaned up when the dialog closes.
   
   ```
   this.store.dispatch(ErrorActions.clearBannerErrors());



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/state/flow-analysis-rules/flow-analysis-rules.effects.ts:
##########
@@ -302,10 +323,10 @@ export class FlowAnalysisRulesEffects {
                             }
                         })
                     ),
-                    catchError((error) =>
+                    catchError((errorResponse: HttpErrorResponse) =>
                         of(
-                            FlowAnalysisRuleActions.flowAnalysisRuleApiError({
-                                error: error.error
+                            
FlowAnalysisRuleActions.flowAnalysisRuleBannerApiError({
+                                error: errorResponse.error

Review Comment:
   This banner error needs cleaned up when the dialog closes.
   
   ```
   this.store.dispatch(ErrorActions.clearBannerErrors());
   ```



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/state/registry-clients/registry-clients.effects.ts:
##########
@@ -145,6 +151,22 @@ export class RegistryClientsEffects {
         )
     );
 
+    flowAnalysisRuleBannerApiError$ = createEffect(() =>
+        this.actions$.pipe(
+            ofType(RegistryClientsActions.registryClientsBannerApiError),
+            map((action) => action.error),
+            switchMap((error) => of(ErrorActions.addBannerError({ error })))
+        )
+    );
+
+    flowAnalysisRuleSnackbarApiError$ = createEffect(() =>

Review Comment:
   rename this to something like `registryClientSnackbarApiError$`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to