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 | 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/03b4d616a6e729b21775c15a01995e12f1a52e76.camel%40uvic.ca.

Reply via email to