-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error message for stream rate limit. (#4207)
* Improve error message for stream rate limit. Signed-off-by: Callum Styan <callumstyan@gmail.com> * Move stream rate limit error message to validation package. Signed-off-by: Callum Styan <callumstyan@gmail.com> * Use ByteSize for number values in stream rate limit error so we can print human readable rate limits and log line byte lengths. Signed-off-by: Callum Styan <callumstyan@gmail.com> * Fix lint issues. Signed-off-by: Callum Styan <callumstyan@gmail.com> * Don't need to type assert twice. Signed-off-by: Callum Styan <callumstyan@gmail.com> * Compare errors contents instead of doing error equals comparison directly since the rate limit error is an RPC error. Signed-off-by: Callum Styan <callumstyan@gmail.com> * Don't call Limit on hot path just to log the value in errors. Signed-off-by: Callum Styan <callumstyan@gmail.com> * Make coment about rate limit clearer. Signed-off-by: Callum Styan <callumstyan@gmail.com>
- Loading branch information
Showing
3 changed files
with
34 additions
and
10 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