-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interceptors #141
Interceptors #141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Type: Enhancement
PR Summary: This pull request introduces the concept of interceptors to the client, allowing for pre-processing and post-processing of requests. It includes the implementation of two specific interceptors: one for retrying requests that fail due to flood errors, and another for retrying requests that fail due to internal server errors. Additionally, the PR makes modifications to the client structure to accommodate interceptors and updates example usage to demonstrate how interceptors can be added to a client.
Decision: Comment
📝 Type: 'Enhancement' - not supported yet.
- Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
✅ Small diff: the diff is small enough to approve with confidence.
No details provided.
General suggestions:
- Consider adding more detailed documentation for each interceptor, explaining the scenarios in which they would be useful. This can help users understand when and why to use these interceptors.
- It might be beneficial to include examples or use cases demonstrating the interceptors' impact on request handling in real-world scenarios. This could further clarify their utility.
- Evaluate the possibility of introducing a mechanism for easily combining multiple interceptors, ensuring they can be composed in a flexible manner without requiring significant boilerplate code.
- Review the interceptor implementation for potential optimizations, particularly in how interceptors are chained and invoked. This could enhance performance, especially for clients making a high volume of requests.
- Ensure thorough testing of the interceptors, particularly in edge cases such as rapid retries or high concurrency, to guarantee their reliability and effectiveness in various conditions.
Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
==========================================
+ Coverage 94.23% 94.61% +0.38%
==========================================
Files 20 21 +1
Lines 2219 2320 +101
==========================================
+ Hits 2091 2195 +104
+ Misses 91 85 -6
- Partials 37 40 +3 ☔ View full report in Codecov by Sentry. |
No description provided.