Skip to content

Commit

Permalink
Update error message on GitHub OSS (#32914)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenGravy authored Oct 4, 2023
1 parent 4c1bbc8 commit da00cfe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/services/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package services

import (
"encoding/json"
"fmt"
"sync"

"github.com/gravitational/trace"
Expand All @@ -26,6 +27,8 @@ import (
"github.com/gravitational/teleport/lib/utils"
)

// ErrRequiresEnterprise indicates that a feature requires
// Teleport Enterprise.
var ErrRequiresEnterprise = trace.AccessDenied("this feature requires Teleport Enterprise")

// githubConnectorMutex is a mutex for the GitHub auth connector
Expand Down Expand Up @@ -159,7 +162,7 @@ func marshalGithubConnector(githubConnector types.GithubConnector, opts ...Marsh
switch githubConnector := githubConnector.(type) {
case *types.GithubConnectorV3:
if githubConnector.Spec.EndpointURL != "" {
return nil, ErrRequiresEnterprise
return nil, fmt.Errorf("GitHub endpoint URL is set: %w", ErrRequiresEnterprise)
}

if !cfg.PreserveResourceID {
Expand Down

0 comments on commit da00cfe

Please sign in to comment.