Changed exception to be able to manage kerberos and x509 auth workflow