If you created this code, you could create your own exception that only includes an appropriate message, and no stack trace (unless of course that is what 'error' does). I have on occasion seen the error page, but do not remeber how to trigger it. Check out the source, https://github.com/apereo/cas and look into custom web flow, https://apereo.github.io/cas/6.2.x/webflow/Webflow-Customization.html, if you are not using the built in password reset, https://apereo.github.io/cas/6.2.x/password_management/Password-Management.html.
Ray On Fri, 2020-11-13 at 09:03 -0800, fmdev wrote: Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information. Thanks for the quick response and sorry for not expressing myself well. The desired behavior would be to raise an exception when there's no email for the given username and based on this exception render an error page. Does such an implementation already exist? Thanks again. On Friday, November 13, 2020 at 5:12:41 PM UTC+1 Ray Bon wrote: You could just replace 'error()' with the text you want. How does 'error()' know what the problem is? Ray On Fri, 2020-11-13 at 03:34 -0800, fmdev wrote: Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information. Hi all, I am using CAS 5.3 and I manually add to my solution the PR 4205<https://github.com/apereo/cas/pull/4205/files> to return the service parameter in the reset password link and it works. In SendPasswordResetInstructionsAction.java I have: final String to = passwordManagementService.findEmail(username); if (StringUtils.isBlank(to)) { LOGGER.warn("No recipient is provided"); return error(); } error() shows the stack trace attached, in that case because final String to is blank due to an inexistent username. My question is how can I show a custom -more user friendly- error instead of showing the stackTrace error? Thanks Regards -- Ray Bon Programmer Analyst Development Services, University Systems 2507218831<tel:(250)%20721-8831> | CLE 019 | [email protected] I respectfully acknowledge that my place of work is located within the ancestral, traditional and unceded territory of the Songhees, Esquimalt and WSÁNEĆ Nations. -- Ray Bon Programmer Analyst Development Services, University Systems 2507218831 | CLE 019 | [email protected]<mailto:[email protected]> I respectfully acknowledge that my place of work is located within the ancestral, traditional and unceded territory of the Songhees, Esquimalt and WSÁNEĆ Nations. -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/d35d05507ae9f2fcb61de8fd8e8834ef46de586f.camel%40uvic.ca.
