feat(oidc): return defined error when discovery failed
This commit is contained in:
parent
b555396744
commit
aadfd3017f
3 changed files with 18 additions and 5 deletions
|
@ -42,7 +42,7 @@ func Discover(ctx context.Context, issuer string, httpClient *http.Client, wellK
|
|||
discoveryConfig := new(oidc.DiscoveryConfiguration)
|
||||
err = httphelper.HttpRequest(httpClient, req, &discoveryConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("%w: %w", oidc.ErrDiscoveryFailed, err)
|
||||
}
|
||||
if logger, ok := logging.FromContext(ctx); ok {
|
||||
logger.Debug("discover", "config", discoveryConfig)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue