Skip to content

Updates for ticket schema rate limits#33

Merged
mbburch merged 12 commits intomainfrom
mbburch/test-ticket-schema-rate-limits
Aug 5, 2025
Merged

Updates for ticket schema rate limits#33
mbburch merged 12 commits intomainfrom
mbburch/test-ticket-schema-rate-limits

Conversation

@mbburch
Copy link
Contributor

@mbburch mbburch commented Jul 22, 2025

This PR adds some additional rate limiting support (and debugging) that corresponds to the baton-sdk changes here. Updates baton-sdk to v0.3.29 to include those changes.

For the following Jira tickets:

@mbburch mbburch force-pushed the mbburch/test-ticket-schema-rate-limits branch from 07dd9d3 to 1d0e190 Compare July 22, 2025 18:31
@mbburch mbburch changed the title Mbburch/test ticket schema rate limits Testing ticket schema rate limits - DO NOT MERGE with SDK changes Jul 23, 2025
cursor[bot]

This comment was marked as outdated.

}

// IsRateLimited checks if the error contains Linear's RATELIMITED error code.
func (e *GraphQLError) IsRateLimited() bool {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laurenleach Not sure if this is helpful, but checks specifically for the error code mentioned in Linear docs. https://linear.app/developers/rate-limiting#handling-rate-limit-errors

@mbburch mbburch force-pushed the mbburch/test-ticket-schema-rate-limits branch from 0844204 to 23133c1 Compare July 23, 2025 17:46
@mbburch
Copy link
Contributor Author

mbburch commented Jul 23, 2025

Bug: Error Handling Wraps All Errors as Rate Limits

The new error handling logic incorrectly wraps all HTTP errors as rate limit errors. A newly added block unconditionally wraps any error with a response using uhttp.WrapErrorsWithRateLimitInfo(codes.Unavailable, resp, err). This misclassifies non-rate-limiting errors (e.g., 404, 500, authentication errors) as rate limit issues, leading to incorrect retry behavior and misleading error reporting, contrary to the original behavior.

pkg/linear/client.go#L995-L1002

@laurenleach ^^ This error is what was confusing me with your wrapping suggestion, so I think I misinterpreted your intent.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@mbburch mbburch force-pushed the mbburch/test-ticket-schema-rate-limits branch 2 times, most recently from 8a2e43a to f873497 Compare July 24, 2025 19:54
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@mbburch mbburch force-pushed the mbburch/test-ticket-schema-rate-limits branch 2 times, most recently from 3d8c84e to 2f3520f Compare August 5, 2025 19:54
@mbburch mbburch changed the title Testing ticket schema rate limits - DO NOT MERGE with SDK changes Updates for ticket schema rate limits Aug 5, 2025
@mbburch mbburch requested a review from laurenleach August 5, 2025 19:57
cursor[bot]

This comment was marked as outdated.

@mbburch mbburch force-pushed the mbburch/test-ticket-schema-rate-limits branch from 2f3520f to 7b051df Compare August 5, 2025 20:00
@mbburch mbburch force-pushed the mbburch/test-ticket-schema-rate-limits branch from 7b051df to 5bd2aaa Compare August 5, 2025 20:06
@mbburch mbburch merged commit a91fae0 into main Aug 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments