When there is an error creating a new openIDConnect authentication
source try to handle the error a little better.
Close#23283
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
returnfmt.Sprintf("Failed to initialize OpenID Connect Provider with name '%s' with url '%s': %v",err.ProviderName,err.OpenIDConnectAutoDiscoveryURL,err.Cause)
returnfmt.Sprintf("Failed to initialize OpenID Connect Provider with name '%s' with url '%s': %v",err.ProviderName,err.OpenIDConnectAutoDiscoveryURL,err.Cause)
}
}
func(errErrOpenIDConnectInitialize)Unwrap()error{
returnerr.Cause
}
// wrapOpenIDConnectInitializeError is used to wrap the error but this cannot be done in modules/auth/oauth2
// wrapOpenIDConnectInitializeError is used to wrap the error but this cannot be done in modules/auth/oauth2