private int handleRedirectError(HttpServletRequest request) throws AuthLoginException {
  final String errorCode=request.getParameter(SAML2Proxy.ERROR_CODE_PARAM_KEY);
  final String errorMessage=request.getParameter(SAML2Proxy.ERROR_MESSAGE_PARAM_KEY);
  if (StringUtils.isNotEmpty(errorMessage)) {
    return processError(errorMessage,"SAML2 :: handleReturnFromRedirect() : " + "error forwarded from saml2AuthAssertionConsumer.jsp.  Error code - {}. " + "Error message - {}",String.valueOf(errorCode),String.valueOf(errorMessage));
  }
 else   if (StringUtils.isNotEmpty(errorCode)) {
    return processError(bundle.getString(errorCode),"SAML2 :: handleReturnFromRedirect() : " + "error forwarded from saml2AuthAssertionConsumer.jsp.  Error code - {}. " + "Error message - {}",errorCode,errorMessage);
  }
 else {
    return processError(bundle.getString("samlVerify"),"SAML2 :: handleReturnFromRedirect() : " + "error forwarded from saml2AuthAssertionConsumer.jsp.  Error code - {}. " + "Error message - {}",errorMessage);
  }
}

private int handleRedirectError ( HttpServletRequest request ) throws AuthLoginException { final String errorCode = request . getParameter ( SAML2Proxy . ERROR_CODE_PARAM_KEY ) ; final String errorMessage = request . getParameter ( SAML2Proxy . ERROR_MESSAGE_PARAM_KEY ) ; if ( StringUtils . isNotEmpty ( errorMessage ) ) { return processError ( errorMessage , "SAML2 :: handleReturnFromRedirect() : " + "error forwarded from saml2AuthAssertionConsumer.jsp.  Error code - {}. " + "Error message - {}" , String . valueOf ( errorCode ) , String . valueOf ( errorMessage ) ) ; } else if ( StringUtils . isNotEmpty ( errorCode ) ) { return processError ( bundle . getString ( errorCode ) , "SAML2 :: handleReturnFromRedirect() : " + "error forwarded from saml2AuthAssertionConsumer.jsp.  Error code - {}. " + "Error message - {}" , errorCode , errorMessage ) ; } else { return processError ( bundle . getString ( "samlVerify" ) , "SAML2 :: handleReturnFromRedirect() : " + "error forwarded from saml2AuthAssertionConsumer.jsp.  Error code - {}. " + "Error message - {}" , errorMessage ) ; } }
grab error code / message and display to user via processerror .
