-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Connectorbuilder: Return responses even in error cases. This lets us bubble rate limiting annotations up the stack. * Pass annotations up the stack so we can obey rate limits and back off on retries. * Retry when error is Deadline exceeded * Return Unavailable when status code is 5xx * Add some comments * Include wait time as detail in gRPC error message * Parse retry-after has int or as date - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date * Remove unused lint exception for gosec * Log a warning if header content is unavailable or not parseable * Log warning for 503 error too * Revert "Remove unused lint exception for gosec" This reverts commit 8b53ccc. * Use `ratelimit.ExtractRateLimitData` * Extract details for rate limit from error * Remove annotations from returns * Generalize detail embedding in error * Ignore unused argument in function * Join any errors when running DoOption functions. Add some comments in syncer. * WIP add some testing/logging stuff for rate limits in client do. * Use one grpc status error instead of joining them together. Round up in rate limiting. * Make WrapErrors public * Return optErrs as well as status code error. * Better name for WrapErrors. Don't return an error in GRPCWrap if there's an issue geting rate limit data or adding details. * Don't return annotations for now. This pull request is big enough already. * Don't shadow err here. * Don't log every time we fail to get rate limit data in an error. This probably happens a lot because not all http servers return rate limit data. --------- Co-authored-by: Jorge Javier Araya Navarro <jorge@esavara.cr>
- Loading branch information
Showing
4 changed files
with
81 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters