fix: keep gRPC status reachable from QdrantResourceExhaustedError - #154
Merged
Anush008 merged 2 commits intoSep 6, 2026
Merged
Conversation
Anush008
reviewed
Sep 6, 2026
Comment on lines
+41
to
+42
| // err is the original gRPC status error, kept so status.Code(err) and | ||
| // errors.As still see codes.ResourceExhausted. |
Member
There was a problem hiding this comment.
Suggested change
| // err is the original gRPC status error, kept so status.Code(err) and | |
| // errors.As still see codes.ResourceExhausted. | |
| // the original gRPC status error |
| return fmt.Sprintf("ResourceExhausted: %s, retry after %d seconds", e.Reason, e.RetryAfterS) | ||
| } | ||
|
|
||
| // Unwrap returns the underlying gRPC status error. |
Member
There was a problem hiding this comment.
Suggested change
| // Unwrap returns the underlying gRPC status error. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
the rate-limit interceptor replaces the server's
ResourceExhaustederror withQdrantResourceExhaustedErrorso callers can readRetryAfterS. The wrapper dropped the original error and had noUnwrap, sostatus.Code(err)returnedcodes.Unknowninstead ofcodes.ResourceExhausted. Any rate-limit handling written against gRPC codes silently stopped matching.Fix: keep the original status error inside the wrapper and add
Unwrap().status.Codeanderrors.Asnow both work on the same error. No public field changesVerified with an in-process gRPC server returning
ResourceExhaustedwith aretry-aftertrailer:status.CodeisUnknownon master,ResourceExhaustedwith this change