Skip to content

Commit

Permalink
codeintel: Fail fast on 401 failure in SCIP detection (#1034)
Browse files Browse the repository at this point in the history
Don't convert SCIP to LSIF, don't attempt to upload the index
  • Loading branch information
varungandhi-src authored Sep 4, 2023
1 parent f3a1963 commit 573ddf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/src/code_intel_upload_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ func isSCIPAvailable() (bool, error) {
return false, err
}
defer resp.Body.Close()
if resp.StatusCode == http.StatusUnauthorized {
return false, upload.ErrUnauthorized
}

return resp.StatusCode == http.StatusOK, nil
}
Expand Down

0 comments on commit 573ddf8

Please sign in to comment.