We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently they are being handled all in the handleClientErrorFailedAction, but it would be better to be extracted and handled in the app.
handleClientErrorFailedAction
Current:
// SunriseLogInController.java @Override public CompletionStage<Result> handleClientErrorFailedAction(final Void input, final Form<? extends LogInFormData> form, final ClientErrorException clientErrorException) { if (isCustomerInvalidCredentialsError(clientErrorException)) { saveFormError(form, "Invalid credentials"); // TODO i18n return showFormPageWithErrors(input, form); } else { return WithContentFormFlow.super.handleClientErrorFailedAction(input, form, clientErrorException); } }
To be:
// SunriseLogInController.java @Override public CompletionStage<Result> handleClientErrorFailedAction(final Void input, final Form<? extends LogInFormData> form, final ClientErrorException clientErrorException) { if (throwable instanceof ErrorResponseException && isCustomerInvalidCredentialsError(clientErrorException)) { return handleCustomerInvalidCredentialsException(form, (ErrorResponseException) throwable); } else { return WithContentFormFlow.super.handleClientErrorFailedAction(input, form, clientErrorException); } } protected abstract CompletionStage<Result> handleCustomerInvalidCredentialsException(final Form<? extends LogInFormData> form, final ErrorResponseException errorResponseException);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently they are being handled all in the
handleClientErrorFailedAction
, but it would be better to be extracted and handled in the app.Current:
To be:
The text was updated successfully, but these errors were encountered: