-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NIFI-13104] Unknown Route handling #8725
Conversation
…n HttpErrorResponse object
Reviewing... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @rfellows! The fixes around the unmatched route looks good. I did not one minor suggestion below to help with readability.
I did however notice a number of additional instances that should be using the new getErrorString
helper method. If you search for errorResponse.error
and error.error
with in this module I think you'll find a few more spots that need updating.
if (errorResponse.error && errorResponse.status !== 0) { | ||
errorMessage = errorResponse.error; | ||
} else if (!errorResponse.error && errorResponse.status !== 0) { | ||
errorMessage = errorResponse.message || `${errorResponse.status}`; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (errorResponse.error && errorResponse.status !== 0) { | |
errorMessage = errorResponse.error; | |
} else if (!errorResponse.error && errorResponse.status !== 0) { | |
errorMessage = errorResponse.message || `${errorResponse.status}`; | |
} | |
if (errorResponse.status !== 0) { | |
if (errorResponse.error) { | |
errorMessage = errorResponse.error; | |
} else { | |
errorMessage = errorResponse.message || `${errorResponse.status}`; | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @rfellows! Will merge once CI completes.
* [NIFI-13104] - Unknown route handling * Add method to the ErrorHelper that safely gets an error string from an HttpErrorResponse object * review feedback * use errorHelper.fullScreenError in favor of directly calling the fullScreenError action This closes apache#8725
* [NIFI-13104] - Unknown route handling * Add method to the ErrorHelper that safely gets an error string from an HttpErrorResponse object * review feedback * use errorHelper.fullScreenError in favor of directly calling the fullScreenError action This closes apache#8725
NIFI-13104