Skip to content

Commit

Permalink
Merge pull request #12 from ConductorOne/ggreer/errors
Browse files Browse the repository at this point in the history
Don't create a new error when http requests fail.
  • Loading branch information
ggreer authored Oct 1, 2024
2 parents 0eb3944 + aecc04f commit 4702844
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/connector/pagination.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func convertPageToken(token string) (uint, error) {
func prepareNextToken(page uint, pageTotal int, total uint) string {
var token string

next := page + uint(pageTotal)
next := page + uint(pageTotal) // #nosec G115
if next < total+1 {
token = strconv.FormatUint(uint64(next), 10)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/databricks/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ func (c *Client) doRequest(ctx context.Context, urlAddress *url.URL, method stri
c.auth.Apply(req)
resp, err := c.httpClient.Do(req, WithJSONResponse(&response))
if err != nil {
return fmt.Errorf("databricks-connector: error: %s", err.Error())
return err
}

defer resp.Body.Close()
Expand Down

0 comments on commit 4702844

Please sign in to comment.