Skip to content

Commit 239125f

Browse files
committed
fix ci
- remove panic - use lib/errors from sg
1 parent 42193ac commit 239125f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cmd/src/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ func (c *config) apiClient(flags *api.Flags, out io.Writer) api.Client {
138138
if c.AccessToken == "" {
139139
if t, err := oauth.LoadToken(context.Background(), c.Endpoint); err == nil {
140140
opts.OAuthToken = t
141-
} else {
142-
// TODO(burmudar): should return an error instead
143-
panic("No access token set and no OAuth token found either - unable to create api client: " + err.Error())
144141
}
145142
}
146143

internal/oauth/http_transport_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package oauth
22

33
import (
44
"context"
5-
"errors"
65
"net/http"
76
"net/http/httptest"
87
"testing"
98
"time"
9+
10+
"github.com/sourcegraph/sourcegraph/lib/errors"
1011
)
1112

1213
type roundTripperFunc func(*http.Request) (*http.Response, error)

0 commit comments

Comments
 (0)