Skip to content

Commit 5bd2aaa

Browse files
author
MB Burch
committed
Remove some debugging and sdk changes
1 parent ac4d656 commit 5bd2aaa

File tree

3 files changed

+20
-43
lines changed

3 files changed

+20
-43
lines changed

pkg/connector/tickets.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ func (ln *Linear) ListTicketSchemas(ctx context.Context, p *pagination.Token) ([
178178
ret = append(ret, ticketSchemaFromTeam(ctx, team, fields))
179179
}
180180

181-
l.Debug("listing ticket schemas completed", zap.Any("ret", ret), zap.Any("pageToken", pageToken), zap.Any("annotations", annotations))
182181
return ret, pageToken, annotations, nil
183182
}
184183

pkg/linear/client.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -972,17 +972,7 @@ func (c *Client) doRequest(ctx context.Context, body interface{}, res interface{
972972

973973
resp, err := c.httpClient.Do(req, doOptions...)
974974

975-
// Add logging for troubleshooting
976975
l := ctxzap.Extract(ctx)
977-
l.Debug("doRequest completed",
978-
zap.Error(err),
979-
zap.Int("status_code", func() int {
980-
if resp != nil {
981-
return resp.StatusCode
982-
}
983-
return 0
984-
}()))
985-
986976
// Linear returns 400 when rate limited, so change it to a retryable error
987977
if err != nil && resp != nil && (resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusTooManyRequests) {
988978
l.Debug("rate limiting detected", zap.Int("status_code", resp.StatusCode))
@@ -991,6 +981,10 @@ func (c *Client) doRequest(ctx context.Context, body interface{}, res interface{
991981
return resp, rlData, uhttp.WrapErrorsWithRateLimitInfo(codes.Unavailable, resp, err)
992982
}
993983

994-
l.Debug("returning without rate limit wrapping")
984+
if resp != nil {
985+
l.Debug("returning without rate limit wrapping", zap.Int("status_code", resp.StatusCode))
986+
} else {
987+
l.Debug("returning without rate limit wrapping", zap.String("status_code", "nil response"))
988+
}
995989
return resp, rlData, err
996990
}

vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go

Lines changed: 15 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)