You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "rfellows (via GitHub)" <gi...@apache.org> on 2024/05/01 20:12:43 UTC

[PR] [NIFI-13104] Unknown Route handling [nifi]

rfellows opened a new pull request, #8725:
URL: https://github.com/apache/nifi/pull/8725

   [NIFI-13104](https://issues.apache.org/jira/browse/NIFI-13104)
   
   * 1st commit: All unknown routes now will show a Route Not Found error page
   * 2nd commit: Added a method to the error helper to safely get an error message from an HttpErrorResponse.


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [NIFI-13104] Unknown Route handling [nifi]

Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman commented on PR #8725:
URL: https://github.com/apache/nifi/pull/8725#issuecomment-2090383228

   Reviewing...


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [NIFI-13104] Unknown Route handling [nifi]

Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman merged PR #8725:
URL: https://github.com/apache/nifi/pull/8725


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [NIFI-13104] Unknown Route handling [nifi]

Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman commented on code in PR #8725:
URL: https://github.com/apache/nifi/pull/8725#discussion_r1587561028


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/service/error-helper.service.ts:
##########
@@ -78,4 +78,18 @@ export class ErrorHelper {
             return this.fullScreenError(errorResponse);
         }
     }
+
+    getErrorString(errorResponse: HttpErrorResponse, prefix?: string): string {
+        let errorMessage = 'An unspecified error occurred.';
+        if (errorResponse.error && errorResponse.status !== 0) {
+            errorMessage = errorResponse.error;
+        } else if (!errorResponse.error && errorResponse.status !== 0) {
+            errorMessage = errorResponse.message || `${errorResponse.status}`;
+        }

Review Comment:
   ```suggestion
           if (errorResponse.status !== 0) {
               if (errorResponse.error) {
                   errorMessage = errorResponse.error;
               } else {
                   errorMessage = errorResponse.message || `${errorResponse.status}`;
               }
           }
   ```



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org