catch error from krb5_ functions