This is an automated email from the ASF dual-hosted git repository.

mcgilman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
     new 31463c5  NIFI-6160 Apply config error handling convention
31463c5 is described below

commit 31463c5dad38be0dcb5f8872c4b423f1f01cc786
Author: Koji Kawamura <[email protected]>
AuthorDate: Wed Apr 3 15:57:25 2019 +0900

    NIFI-6160 Apply config error handling convention
    
    What this PR changed:
    - Standardized required name error message to 'The name of the xxxx must
    be specified'
    - Added nfErrorHandler.handleConfigurationUpdateAjaxError
        - Replaced existing custom error handling for 400 status code
        - Replaced handleAjxError with this where appropriate
    - Standardized config error dialog title to 'Configuration Error'
    - Close the configuration dialog when configuration is successfully
    updated
    
    Above convention applied to following components:
    - ProcessGroup
    - Input/OutputPort
    - RemoteProcessGroup
        - RemoteGroupPort
    - Template
    - Connection
    - ControllerService
    - Label
    - Processor
    - ReportingTask
    - NiFi Settings/GENERAL tab
    - Variable
    - User
    
    NIFI-6170 Provide consistent UX at Connection config
    Fixed Label.
    
    Incorporated review comments
    Removed unnecessary else block.
    Disable canvas when the message pane is shown
    
    This closes #3401
---
 .../apache/nifi/groups/StandardProcessGroup.java   |  2 +-
 .../nifi/web/dao/impl/StandardInputPortDAO.java    |  2 +-
 .../nifi/web/dao/impl/StandardOutputPortDAO.java   |  2 +-
 .../header/components/nf-ng-group-component.js     | 12 +--
 .../components/nf-ng-input-port-component.js       |  8 +-
 .../components/nf-ng-output-port-component.js      |  8 +-
 .../nf-ng-remote-process-group-component.js        | 20 +----
 .../src/main/webapp/js/nf/canvas/nf-actions.js     |  4 +-
 .../webapp/js/nf/canvas/nf-canvas-error-handler.js | 45 +++++++---
 .../js/nf/canvas/nf-connection-configuration.js    | 33 ++------
 .../src/main/webapp/js/nf/canvas/nf-connection.js  | 11 +--
 .../webapp/js/nf/canvas/nf-controller-service.js   | 29 +------
 .../src/main/webapp/js/nf/canvas/nf-draggable.js   | 19 +----
 .../webapp/js/nf/canvas/nf-label-configuration.js  |  8 +-
 .../webapp/js/nf/canvas/nf-port-configuration.js   | 27 +-----
 .../js/nf/canvas/nf-process-group-configuration.js |  2 +-
 .../js/nf/canvas/nf-processor-configuration.js     | 31 +------
 .../nf-remote-process-group-configuration.js       | 20 +----
 .../js/nf/canvas/nf-remote-process-group-ports.js  | 43 +---------
 .../main/webapp/js/nf/canvas/nf-reporting-task.js  | 29 +------
 .../src/main/webapp/js/nf/canvas/nf-settings.js    | 97 ++++++++++++++--------
 .../webapp/js/nf/canvas/nf-variable-registry.js    | 10 ++-
 .../src/main/webapp/js/nf/nf-error-handler.js      | 32 ++++++-
 .../src/main/webapp/js/nf/nf-processor-details.js  | 11 +--
 .../src/main/webapp/js/nf/users/nf-users-table.js  | 15 ++--
 25 files changed, 192 insertions(+), 328 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
index c16d557..e9aea02 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
@@ -252,7 +252,7 @@ public final class StandardProcessGroup implements 
ProcessGroup {
     @Override
     public void setName(final String name) {
         if (StringUtils.isBlank(name)) {
-            throw new IllegalArgumentException("The name cannot be blank.");
+            throw new IllegalArgumentException("The name of the process group 
must be specified.");
         }
 
         this.name.set(name);
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardInputPortDAO.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardInputPortDAO.java
index c08cb70..c846f2e 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardInputPortDAO.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardInputPortDAO.java
@@ -162,7 +162,7 @@ public class StandardInputPortDAO extends ComponentDAO 
implements PortDAO {
         List<String> validationErrors = new ArrayList<>();
 
         if (isNotNull(portDTO.getName()) && 
portDTO.getName().trim().isEmpty()) {
-            validationErrors.add("Port name cannot be blank.");
+            validationErrors.add("The name of the port must be specified.");
         }
         if (isNotNull(portDTO.getConcurrentlySchedulableTaskCount()) && 
portDTO.getConcurrentlySchedulableTaskCount() <= 0) {
             validationErrors.add("Concurrent tasks must be a positive 
integer.");
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardOutputPortDAO.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardOutputPortDAO.java
index f4eea8a..613a97f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardOutputPortDAO.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardOutputPortDAO.java
@@ -158,7 +158,7 @@ public class StandardOutputPortDAO extends ComponentDAO 
implements PortDAO {
         List<String> validationErrors = new ArrayList<>();
 
         if (isNotNull(portDTO.getName()) && 
portDTO.getName().trim().isEmpty()) {
-            validationErrors.add("Port name cannot be blank.");
+            validationErrors.add("The name of the port must be specified.");
         }
         if (isNotNull(portDTO.getConcurrentlySchedulableTaskCount()) && 
portDTO.getConcurrentlySchedulableTaskCount() <= 0) {
             validationErrors.add("Concurrent tasks must be a positive 
integer.");
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
index 9f603b2..346df47 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
@@ -102,7 +102,7 @@
 
                 // update the birdseye
                 nfBirdseye.refresh();
-            }).fail(nfErrorHandler.handleAjaxError);
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
         };
 
         function GroupComponent() {
@@ -235,18 +235,18 @@
                         // get the name of the group and clear the textfield
                         var groupName = $('#new-process-group-name').val();
 
-                        // hide the dialog
-                        groupComponent.modal.hide();
-
                         // ensure the group name is specified
                         if (nfCommon.isBlank(groupName)) {
                             nfDialog.showOkDialog({
-                                headerText: 'Create Process Group',
-                                dialogContent: 'The group name is required.'
+                                headerText: 'Configuration Error',
+                                dialogContent: 'The name of the process group 
must be specified.'
                             });
 
                             deferred.reject();
                         } else {
+                            // hide the dialog
+                            groupComponent.modal.hide();
+
                             // create the group and resolve the deferred 
accordingly
                             createGroup(groupName, pt).done(function 
(response) {
                                 deferred.resolve(response.component);
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
index 9bcc56a..9c441a6 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
@@ -91,12 +91,15 @@
                     'selectAll': true
                 });
 
+                // hide the dialog
+                inputPortComponent.modal.hide();
+
                 // update component visibility
                 nfGraph.updateVisibility();
 
                 // update the birdseye
                 nfBirdseye.refresh();
-            }).fail(nfErrorHandler.handleAjaxError);
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
         };
 
         function InputPortComponent() {
@@ -217,9 +220,6 @@
                     // get the name of the input port and clear the textfield
                     var portName = $('#new-port-name').val();
 
-                    // hide the dialog
-                    inputPortComponent.modal.hide();
-
                     // create the input port
                     createInputPort(portName, pt);
                 };
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
index 6abf4fb..997a2a3 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
@@ -91,12 +91,15 @@
                     'selectAll': true
                 });
 
+                // hide the dialog
+                outputPortComponent.modal.hide();
+
                 // update component visibility
                 nfGraph.updateVisibility();
 
                 // update the birdseye
                 nfBirdseye.refresh();
-            }).fail(nfErrorHandler.handleAjaxError);
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
         };
 
         function OutputPortComponent() {
@@ -208,9 +211,6 @@
                     // get the name of the output port and clear the textfield
                     var portName = $('#new-port-name').val();
 
-                    // hide the dialog
-                    outputPortComponent.modal.hide();
-
                     // create the output port
                     createOutputPort(portName, pt);
                 };
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
index 30b5ccb..8394907 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
@@ -113,25 +113,7 @@
 
                 // update the birdseye
                 nfBirdseye.refresh();
-            }).fail(function (xhr, status, error) {
-                if (xhr.status === 400) {
-                    var errors = xhr.responseText.split('\n');
-
-                    var content;
-                    if (errors.length === 1) {
-                        content = $('<span></span>').text(errors[0]);
-                    } else {
-                        content = nfCommon.formatUnorderedList(errors);
-                    }
-
-                    nfDialog.showOkDialog({
-                        dialogContent: content,
-                        headerText: 'Configuration Error'
-                    });
-                } else {
-                    nfErrorHandler.handleAjaxError(xhr, status, error);
-                }
-            });
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
         };
 
         function RemoteProcessGroupComponent() {
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
index cb33ccc..238ff05 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
@@ -1642,8 +1642,8 @@
                         // ensure the template name is not blank
                         if (nfCommon.isBlank(templateName)) {
                             nfDialog.showOkDialog({
-                                headerText: 'Create Template',
-                                dialogContent: "The template name cannot be 
blank."
+                                headerText: 'Configuration Error',
+                                dialogContent: "The name of the template must 
be specified."
                             });
                             return;
                         }
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js
index 05519a3..ad4305f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js
@@ -41,17 +41,10 @@
 }(this, function (ajaxErrorHandler, nfCommon, nfCanvas, nfContextMenu) {
     'use strict';
 
-    return {
-
-        /**
-         * Method for handling ajax errors. This also closes the canvas.
-         *
-         * @argument {object} xhr       The XmlHttpRequest
-         * @argument {string} status    The status of the request
-         * @argument {string} error     The error
-         */
-        handleAjaxError: function (xhr, status, error) {
-            ajaxErrorHandler.handleAjaxError(xhr, status, error);
+     var disableCanvas = function() {
+        // In case no further requests will be successful based on the status,
+        // the canvas is disabled, and the message pane is shown.
+        if ($('#message-pane').is(':visible')) {
             nfCommon.showLogoutLink();
 
             // hide the splash screen if required
@@ -65,8 +58,36 @@
             // shut off the auto refresh
             nfCanvas.stopPolling();
 
-            // allow page refresh with ctrl-r
+            // disable page refresh with ctrl-r
             nfCanvas.disableRefreshHotKey();
         }
     };
+
+    return {
+
+        /**
+         * Method for handling ajax errors. This also closes the canvas if 
necessary.
+         *
+         * @argument {object} xhr       The XmlHttpRequest
+         * @argument {string} status    The status of the request
+         * @argument {string} error     The error
+         */
+        handleAjaxError: function (xhr, status, error) {
+            ajaxErrorHandler.handleAjaxError(xhr, status, error);
+            disableCanvas();
+        },
+
+        /**
+         * Method for handling ajax errors when submitting configuration 
update (PUT/POST) requests.
+         * This method delegates error handling to ajaxErrorHandler.
+         *
+         * @argument {object} xhr       The XmlHttpRequest
+         * @argument {string} status    The status of the request
+         * @argument {string} error     The error
+         */
+        handleConfigurationUpdateAjaxError: function (xhr, status, error) {
+            ajaxErrorHandler.handleConfigurationUpdateAjaxError(xhr, status, 
error);
+            disableCanvas();
+        }
+    };
 }));
\ No newline at end of file
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
index 1704fe5..df18a7b 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
@@ -129,9 +129,6 @@
                             handler: {
                                 click: function () {
                                     addConnection(getSelectedRelationships());
-
-                                    // close the dialog
-                                    
$('#connection-configuration').modal('hide');
                                 }
                             }
                         },
@@ -195,9 +192,6 @@
                             click: function () {
                                 // add the connection
                                 addConnection();
-
-                                // close the dialog
-                                $('#connection-configuration').modal('hide');
                             }
                         }
                     },
@@ -971,6 +965,9 @@
                     'selectAll': true
                 });
 
+                // close the dialog
+                $('#connection-configuration').modal('hide');
+
                 // reload the connections source/destination components
                 
nfCanvasUtils.reloadConnectionSourceAndDestination(sourceComponentId, 
destinationComponentId);
 
@@ -979,10 +976,7 @@
 
                 // update the birdseye
                 nfBirdseye.refresh();
-            }).fail(function (xhr, status, error) {
-                // handle the error
-                nfErrorHandler.handleAjaxError(xhr, status, error);
-            });
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
         }
     };
 
@@ -1051,21 +1045,15 @@
                 dataType: 'json',
                 contentType: 'application/json'
             }).done(function (response) {
+                // close the dialog
+                $('#connection-configuration').modal('hide');
+
                 // update this connection
                 nfConnection.set(response);
 
                 // reload the connections source/destination components
                 
nfCanvasUtils.reloadConnectionSourceAndDestination(sourceComponentId, 
destinationComponentId);
-            }).fail(function (xhr, status, error) {
-                if (xhr.status === 400 || xhr.status === 404 || xhr.status === 
409) {
-                    nfDialog.showOkDialog({
-                        headerText: 'Connection Configuration',
-                        dialogContent: nfCommon.escapeHtml(xhr.responseText),
-                    });
-                } else {
-                    nfErrorHandler.handleAjaxError(xhr, status, error);
-                }
-            });
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
         } else {
             return $.Deferred(function (deferred) {
                 deferred.reject();
@@ -1120,7 +1108,7 @@
 
         if (errors.length > 0) {
             nfDialog.showOkDialog({
-                headerText: 'Connection Configuration',
+                headerText: 'Configuration Error',
                 dialogContent: nfCommon.formatUnorderedList(errors)
             });
             return false;
@@ -1495,9 +1483,6 @@
                                         deferred.reject();
                                     });
                                 }
-
-                                // close the dialog
-                                $('#connection-configuration').modal('hide');
                             }
                         }
                     },
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
index 662a918..b325c32 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
@@ -1614,16 +1614,7 @@
         }).done(function (response) {
             // request was successful, update the entry
             nfConnection.set(response);
-        }).fail(function (xhr, status, error) {
-            if (xhr.status === 400 || xhr.status === 404 || xhr.status === 
409) {
-                nfDialog.showOkDialog({
-                    headerText: 'Connection',
-                    dialogContent: nfCommon.escapeHtml(xhr.responseText)
-                });
-            } else {
-                nfErrorHandler.handleAjaxError(xhr, status, error);
-            }
-        });
+        }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
     };
 
     // removes the specified connections
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
index 3938d94..e89a212 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
@@ -78,33 +78,6 @@
     };
 
     /**
-     * Handle any expected controller service configuration errors.
-     *
-     * @argument {object} xhr       The XmlHttpRequest
-     * @argument {string} status    The status of the request
-     * @argument {string} error     The error
-     */
-    var handleControllerServiceConfigurationError = function (xhr, status, 
error) {
-        if (xhr.status === 400) {
-            var errors = xhr.responseText.split('\n');
-
-            var content;
-            if (errors.length === 1) {
-                content = $('<span></span>').text(errors[0]);
-            } else {
-                content = nfCommon.formatUnorderedList(errors);
-            }
-
-            nfDialog.showOkDialog({
-                dialogContent: content,
-                headerText: 'Controller Service'
-            });
-        } else {
-            nfErrorHandler.handleAjaxError(xhr, status, error);
-        }
-    };
-
-    /**
      * Determines whether the user has made any changes to the controller 
service configuration
      * that needs to be saved.
      */
@@ -1606,7 +1579,7 @@
                 $.each(previouslyReferencedServiceIds, function (_, 
oldServiceReferenceId) {
                     reloadControllerService(serviceTable, 
oldServiceReferenceId);
                 });
-            }).fail(handleControllerServiceConfigurationError);
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
         } else {
             return $.Deferred(function (deferred) {
                 deferred.reject();
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
index 3c67f6e..37904a3 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
@@ -295,15 +295,7 @@
                         id: d.id
                     });
                 }).fail(function (xhr, status, error) {
-                    if (xhr.status === 400 || xhr.status === 404 || xhr.status 
=== 409) {
-                        nfDialog.showOkDialog({
-                            headerText: 'Component Position',
-                            dialogContent: 
nfCommon.escapeHtml(xhr.responseText)
-                        });
-                    } else {
-                        nfErrorHandler.handleAjaxError(xhr, status, error);
-                    }
-
+                    nfErrorHandler.handleAjaxError(xhr, status, error);
                     deferred.reject();
                 });
             }).promise();
@@ -357,14 +349,7 @@
                         id: d.id
                     });
                 }).fail(function (xhr, status, error) {
-                    if (xhr.status === 400 || xhr.status === 404 || xhr.status 
=== 409) {
-                        nfDialog.showOkDialog({
-                            headerText: 'Component Position',
-                            dialogContent: 
nfCommon.escapeHtml(xhr.responseText)
-                        });
-                    } else {
-                        nfErrorHandler.handleAjaxError(xhr, status, error);
-                    }
+                    nfErrorHandler.handleAjaxError(xhr, status, error);
 
                     deferred.reject();
                 });
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
index 9063337..cbc0120 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
@@ -76,6 +76,7 @@
                     },
                     handler: {
                         click: function () {
+                            var self = this;
                             // get the label data
                             var labelData = d3.select('#id-' + 
labelId).datum();
 
@@ -109,10 +110,11 @@
 
                                 // inform Angular app values have changed
                                 nfNgBridge.digest();
-                            }).fail(nfErrorHandler.handleAjaxError);
 
-                            // reset and hide the dialog
-                            this.modal('hide');
+                                // reset and hide the dialog
+                                self.modal('hide');
+                            
}).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
+
                         }
                     }
                 },
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
index 0ee0a42..77e4798 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
@@ -121,32 +121,7 @@
 
                             // close the details panel
                             $('#port-configuration').modal('hide');
-                        }).fail(function (xhr, status, error) {
-                            // handle bad request locally to keep the dialog 
open, allowing the user
-                            // to make changes. if the request fails for 
another reason, the dialog
-                            // should be closed so the issue can be addressed 
(stale flow for instance)
-                            if (xhr.status === 400) {
-                                var errors = xhr.responseText.split('\n');
-
-                                var content;
-                                if (errors.length === 1) {
-                                    content = 
$('<span></span>').text(errors[0]);
-                                } else {
-                                    content = 
nfCommon.formatUnorderedList(errors);
-                                }
-
-                                nfDialog.showOkDialog({
-                                    dialogContent: content,
-                                    headerText: 'Port Configuration'
-                                });
-                            } else {
-                                // close the details panel
-                                $('#port-configuration').modal('hide');
-
-                                // handle the error
-                                nfErrorHandler.handleAjaxError(xhr, status, 
error);
-                            }
-                        });
+                        
}).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
                     }
                 }
             },
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
index fb6756d..d354096 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
@@ -129,7 +129,7 @@
             });
 
             nfCanvasUtils.reload();
-        }).fail(nfErrorHandler.handleAjaxError);
+        }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
     };
 
     /**
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
index c170fe3..54ca51f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
@@ -141,33 +141,6 @@
     };
 
     /**
-     * Handle any expected processor configuration errors.
-     *
-     * @argument {object} xhr       The XmlHttpRequest
-     * @argument {string} status    The status of the request
-     * @argument {string} error     The error
-     */
-    var handleProcessorConfigurationError = function (xhr, status, error) {
-        if (xhr.status === 400) {
-            var errors = xhr.responseText.split('\n');
-
-            var content;
-            if (errors.length === 1) {
-                content = $('<span></span>').text(errors[0]);
-            } else {
-                content = nfCommon.formatUnorderedList(errors);
-            }
-
-            nfDialog.showOkDialog({
-                dialogContent: content,
-                headerText: 'Processor Configuration'
-            });
-        } else {
-            nfErrorHandler.handleAjaxError(xhr, status, error);
-        }
-    };
-
-    /**
      * Creates an option for the specified relationship name.
      *
      * @argument {object} relationship      The relationship
@@ -426,7 +399,7 @@
         if (errors.length > 0) {
             nfDialog.showOkDialog({
                 dialogContent: nfCommon.formatUnorderedList(errors),
-                headerText: 'Processor Configuration'
+                headerText: 'Configuration Error'
             });
             return false;
         } else {
@@ -508,7 +481,7 @@
             }).done(function (response) {
                 // set the new processor state based on the response
                 nfProcessor.set(response);
-            }).fail(handleProcessorConfigurationError);
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
         } else {
             return $.Deferred(function (deferred) {
                 deferred.reject();
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
index 3f23c38..f57ef69 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
@@ -110,25 +110,7 @@
 
                                 // close the details panel
                                 
$('#remote-process-group-configuration').modal('hide');
-                            }).fail(function (xhr, status, error) {
-                                if (xhr.status === 400) {
-                                    var errors = xhr.responseText.split('\n');
-
-                                    var content;
-                                    if (errors.length === 1) {
-                                        content = 
$('<span></span>').text(errors[0]);
-                                    } else {
-                                        content = 
nfCommon.formatUnorderedList(errors);
-                                    }
-
-                                    nfDialog.showOkDialog({
-                                        dialogContent: content,
-                                        headerText: 'Remote Process Group 
Configuration'
-                                    });
-                                } else {
-                                    nfErrorHandler.handleAjaxError(xhr, 
status, error);
-                                }
-                            });
+                            
}).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
                         }
                     }
                 },
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
index de9fab5..8f87975 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
@@ -146,38 +146,16 @@
                                 $('#' + remotePortId + 
'-batch-size').text(batchSettings.size);
                                 $('#' + remotePortId + 
'-batch-duration').text(batchSettings.duration);
 
-                            }).fail(function (xhr, status, error) {
-                                if (xhr.status === 400) {
-                                    var errors = xhr.responseText.split('\n');
-
-                                    var content;
-                                    if (errors.length === 1) {
-                                        content = 
$('<span></span>').text(errors[0]);
-                                    } else {
-                                        content = 
nfCommon.formatUnorderedList(errors);
-                                    }
-
-                                    nfDialog.showOkDialog({
-                                        dialogContent: content,
-                                        headerText: 'Remote Process Group 
Ports'
-                                    });
-                                } else {
-                                    nfErrorHandler.handleAjaxError(xhr, 
status, error);
-                                }
-                            }).always(function () {
                                 // close the dialog
                                 $('#remote-port-configuration').modal('hide');
-                            });
+                            
}).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
                         } else {
                             nfDialog.showOkDialog({
-                                headerText: 'Remote Process Group Ports',
+                                headerText: 'Configuration Error',
                                 dialogContent: 
portValidationErrors.reduce(function (prev, curr) {
                                     return typeof(prev) === 'string' ? prev + 
' ' + curr : curr;
                                 })
                             });
-
-                            // close the dialog
-                            $('#remote-port-configuration').modal('hide');
                         }
                     }
                 }
@@ -440,23 +418,8 @@
                         transmissionSwitch.replaceWith(newTransmissionSwitch);
                         // update transmissionSwitch variable to reference the 
new switch
                         transmissionSwitch = newTransmissionSwitch;
-                        if (xhr.status === 400) {
-                            var errors = xhr.responseText.split('\n');
 
-                            var content;
-                            if (errors.length === 1) {
-                                content = $('<span></span>').text(errors[0]);
-                            } else {
-                                content = nfCommon.formatUnorderedList(errors);
-                            }
-
-                            nfDialog.showOkDialog({
-                                headerText: 'Remote Process Group Ports',
-                                dialogContent: content
-                            });
-                        } else {
-                            nfErrorHandler.handleAjaxError(xhr, status, error);
-                        }
+                        nfErrorHandler.handleConfigurationUpdateAjaxError(xhr, 
status, error);
                     });
                 };
 
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
index 4127f1c..07e59f5 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
@@ -82,33 +82,6 @@
     };
 
     /**
-     * Handle any expected reporting task configuration errors.
-     *
-     * @argument {object} xhr       The XmlHttpRequest
-     * @argument {string} status    The status of the request
-     * @argument {string} error     The error
-     */
-    var handleReportingTaskConfigurationError = function (xhr, status, error) {
-        if (xhr.status === 400) {
-            var errors = xhr.responseText.split('\n');
-
-            var content;
-            if (errors.length === 1) {
-                content = $('<span></span>').text(errors[0]);
-            } else {
-                content = nfCommon.formatUnorderedList(errors);
-            }
-
-            nfDialog.showOkDialog({
-                dialogContent: content,
-                headerText: 'Reporting Task'
-            });
-        } else {
-            nfErrorHandler.handleAjaxError(xhr, status, error);
-        }
-    };
-
-    /**
      * Determines whether the user has made any changes to the reporting task 
configuration
      * that needs to be saved.
      */
@@ -322,7 +295,7 @@
             }).done(function (response) {
                 // update the reporting task
                 renderReportingTask(response);
-            }).fail(handleReportingTaskConfigurationError);
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
         } else {
             return $.Deferred(function (deferred) {
                 deferred.reject();
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
index a96267f..d6a5796 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
@@ -109,6 +109,33 @@
     };
 
     /**
+     * Validates the configured settings.
+     *
+     * @argument {object} configuration       The settings to validate
+     */
+    var validateSettings = function (configuration) {
+        var errors = [];
+
+        // ensure numeric fields are specified correctly
+        if 
(nfCommon.isDefinedAndNotNull(configuration['maxTimerDrivenThreadCount']) && 
!$.isNumeric(configuration['maxTimerDrivenThreadCount'])) {
+            errors.push('Maximum Timer Driven Thread Count must be an integer 
value');
+        }
+        if 
(nfCommon.isDefinedAndNotNull(configuration['maxEventDrivenThreadCount']) && 
!$.isNumeric(configuration['maxEventDrivenThreadCount'])) {
+            errors.push('Maximum Event Driven Thread Count must be an integer 
value');
+        }
+
+        if (errors.length > 0) {
+            nfDialog.showOkDialog({
+                dialogContent: nfCommon.formatUnorderedList(errors),
+                headerText: 'Configuration Error'
+            });
+            return false;
+        } else {
+            return true;
+        }
+    };
+
+    /**
      * Saves the settings for the controller.
      *
      * @param version
@@ -116,35 +143,38 @@
     var saveSettings = function (version) {
         // marshal the configuration details
         var configuration = marshalConfiguration();
-        var entity = {
-            'revision': nfClient.getRevision({
-                'revision': {
-                    'version': version
-                }
-            }),
-            'disconnectedNodeAcknowledged': 
nfStorage.isDisconnectionAcknowledged(),
-            'component': configuration
-        };
+        // ensure settings are valid as far as we can tell
+        if (validateSettings(configuration)) {
+            var entity = {
+                'revision': nfClient.getRevision({
+                    'revision': {
+                        'version': version
+                    }
+                }),
+                'disconnectedNodeAcknowledged': 
nfStorage.isDisconnectionAcknowledged(),
+                'component': configuration
+            };
 
-        // save the new configuration details
-        $.ajax({
-            type: 'PUT',
-            url: config.urls.controllerConfig,
-            data: JSON.stringify(entity),
-            dataType: 'json',
-            contentType: 'application/json'
-        }).done(function (response) {
-            // close the settings dialog
-            nfDialog.showOkDialog({
-                headerText: 'Settings',
-                dialogContent: 'Settings successfully applied.'
-            });
+            // save the new configuration details
+            $.ajax({
+                type: 'PUT',
+                url: config.urls.controllerConfig,
+                data: JSON.stringify(entity),
+                dataType: 'json',
+                contentType: 'application/json'
+            }).done(function (response) {
+                // close the settings dialog
+                nfDialog.showOkDialog({
+                    headerText: 'Settings',
+                    dialogContent: 'Settings successfully applied.'
+                });
 
-            // register the click listener for the save button
-            $('#settings-save').off('click').on('click', function () {
-                saveSettings(response.revision.version);
-            });
-        }).fail(nfErrorHandler.handleAjaxError);
+                // register the click listener for the save button
+                $('#settings-save').off('click').on('click', function () {
+                    saveSettings(response.revision.version);
+                });
+            }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
+        }
     }
 
     /**
@@ -519,10 +549,11 @@
             var row = registriesData.getRowById(registryEntity.id);
             nfFilteredDialogCommon.choseRow(registriesGrid, row);
             registriesGrid.scrollRowIntoView(row);
-        }).fail(nfErrorHandler.handleAjaxError);
 
-        // hide the dialog
-        $('#registry-configuration-dialog').modal('hide');
+            // hide the dialog
+            $('#registry-configuration-dialog').modal('hide');
+        }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
+
 
         return addRegistry;
     };
@@ -560,10 +591,10 @@
             registriesData.updateItem(registryId, $.extend({
                 type: 'Registry'
             }, registryEntity));
-        }).fail(nfErrorHandler.handleAjaxError);
 
-        // hide the dialog
-        $('#registry-configuration-dialog').modal('hide');
+            // hide the dialog
+            $('#registry-configuration-dialog').modal('hide');
+        }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
 
         return updateRegistry;
     };
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
index fa31b5b..ad51d3f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
@@ -1503,15 +1503,17 @@
                     variableGrid.scrollRowIntoView(matchingRow);
                 }
             }
+
+            // close the new variable dialog
+            $('#new-variable-dialog').modal('hide');
+
         } else {
             nfDialog.showOkDialog({
-                headerText: 'Variable Name',
-                dialogContent: 'Variable name must be specified.'
+                headerText: 'Configuration Error',
+                dialogContent: 'The name of the variable must be specified.'
             });
         }
 
-        // close the new variable dialog
-        $('#new-variable-dialog').modal('hide');
     };
 
     /**
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-error-handler.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-error-handler.js
index f7a538f..1831daf 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-error-handler.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-error-handler.js
@@ -37,7 +37,7 @@
 }(this, function ($, nfDialog, nfCommon) {
     'use strict';
 
-    return {
+    var self = {
         /**
          * Method for handling ajax errors.
          *
@@ -142,6 +142,36 @@
                 // show the error pane
                 $('#message-pane').show();
             }
+        },
+
+        /**
+         * Method for handling ajax errors when submitting configuration 
update (PUT/POST) requests.
+         * In addition to what handleAjaxError does, this function splits
+         * the error message text to display them as an unordered list.
+         *
+         * @argument {object} xhr       The XmlHttpRequest
+         * @argument {string} status    The status of the request
+         * @argument {string} error     The error
+         */
+        handleConfigurationUpdateAjaxError: function (xhr, status, error) {
+            if (xhr.status === 400) {
+                var errors = xhr.responseText.split('\n');
+
+                var content;
+                if (errors.length === 1) {
+                    content = $('<span></span>').text(errors[0]);
+                } else {
+                    content = nfCommon.formatUnorderedList(errors);
+                }
+
+                nfDialog.showOkDialog({
+                    dialogContent: content,
+                    headerText: 'Configuration Error'
+                });
+            } else {
+                self.handleAjaxError(xhr, status, error);
+            }
         }
     };
+    return self;
 }));
\ No newline at end of file
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
index 2a956b6..30d388f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
@@ -307,16 +307,7 @@
                 if (processorRelationships.is(':visible') && 
processorRelationships.get(0).scrollHeight > 
Math.round(processorRelationships.innerHeight())) {
                     processorRelationships.css('border-width', '1px');
                 }
-            }).fail(function (xhr, status, error) {
-                if (xhr.status === 400 || xhr.status === 404 || xhr.status === 
409) {
-                    nfDialog.showOkDialog({
-                        headerText: 'Error',
-                        dialogContent: nfCommon.escapeHtml(xhr.responseText)
-                    });
-                } else {
-                    nfErrorHandler.handleAjaxError(xhr, status, error);
-                }
-            });
+            }).fail(nfErrorHandler.handleAjaxError);
         }
     };
 }));
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
index 04f4807..1529779 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
@@ -252,6 +252,8 @@
 
         // if the user was successfully created
         userXhr.done(function (userEntity) {
+            $('#user-dialog').modal('hide');
+
             var xhrs = [];
             $.each(selectedGroups, function (_, selectedGroup) {
                 var groupEntity = usersData.getItemById(selectedGroup.id)
@@ -266,7 +268,7 @@
                     usersGrid.scrollRowIntoView(row);
                 });
             }).fail(nfErrorHandler.handleAjaxError);
-        }).fail(nfErrorHandler.handleAjaxError);
+        }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
     };
 
     /**
@@ -302,6 +304,8 @@
 
         userXhr.done(function (updatedUserEntity) {
 
+            $('#user-dialog').modal('hide');
+
             // determine what to add/remove
             var groupsAdded = [];
             var groupsRemoved = [];
@@ -340,7 +344,7 @@
             $.when.apply(window, xhrs).always(function () {
                 nfUsersTable.loadUsersTable();
             }).fail(nfErrorHandler.handleAjaxError);
-        }).fail(nfErrorHandler.handleAjaxError);
+        }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
     };
 
     /**
@@ -357,6 +361,7 @@
             dataType: 'json',
             contentType: 'application/json'
         }).done(function (groupEntity) {
+            $('#user-dialog').modal('hide');
             nfUsersTable.loadUsersTable().done(function () {
                 // add the user
                 var usersGrid = $('#users-table').data('gridInstance');
@@ -367,7 +372,7 @@
                 usersGrid.setSelectedRows([row]);
                 usersGrid.scrollRowIntoView(row);
             });
-        }).fail(nfErrorHandler.handleAjaxError);
+        }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
     };
 
     var updateGroup = function (groupId, groupIdentity, selectedUsers) {
@@ -394,8 +399,9 @@
             dataType: 'json',
             contentType: 'application/json'
         }).done(function (groupEntity) {
+            $('#user-dialog').modal('hide');
             nfUsersTable.loadUsersTable();
-        }).fail(nfErrorHandler.handleAjaxError);
+        }).fail(nfErrorHandler.handleConfigurationUpdateAjaxError);
     };
 
     /**
@@ -459,7 +465,6 @@
                             }
                         }
 
-                        $('#user-dialog').modal('hide');
                     }
                 }
             }, {

Reply via email to