-
Notifications
You must be signed in to change notification settings - Fork 98
Un-deprecate Config.httpClient
and improve it
#1979
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes refactor error handling and custom HTTP client integration. The Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant HttpRequests
participant CustomHttpClient
participant MeiliSearchApiError
Client->>HttpRequests: make request
HttpRequests->>CustomHttpClient: call httpClient(...)
CustomHttpClient-->>HttpRequests: return {success, value, details}
alt success = true
HttpRequests-->>Client: return value
else success = false
HttpRequests->>MeiliSearchApiError: throw with value, details
MeiliSearchApiError-->>HttpRequests: error instance
HttpRequests-->>Client: throw error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Graph Analysis (1)src/errors/meilisearch-api-error.ts (1)
🔇 Additional comments (9)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1979 +/- ##
=======================================
Coverage 99.01% 99.02%
=======================================
Files 18 18
Lines 1418 1429 +11
Branches 299 304 +5
=======================================
+ Hits 1404 1415 +11
Misses 14 14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull Request
Related issue
Fixes #1824
What does this PR do?
MeiliSearchApiError
constructor parametersConfig.httpClient
function (check documentation)Summary by CodeRabbit
New Features
Bug Fixes
Tests