Browse Source

Merge pull request #863 from jmorganca/mxyng/nil-pointer

fix: nil pointer dereference
Michael Yang 1 year ago
parent
commit
0d6342a882
1 changed files with 1 additions and 0 deletions
  1. 1 0
      server/auth.go

+ 1 - 0
server/auth.go

@@ -106,6 +106,7 @@ func getAuthToken(ctx context.Context, redirData AuthRedirect) (string, error) {
 	resp, err := makeRequest(ctx, "GET", redirectURL, headers, nil, nil)
 	if err != nil {
 		log.Printf("couldn't get token: %q", err)
+		return "", err
 	}
 	defer resp.Body.Close()