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 <(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. > -- - 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/dc673870-0acf-4de2-9c62-41e19de3c65en%40apereo.org.
