-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
✅ test: add unit test for src/utils/errorResponse.ts #6300
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
👍 @gru-agent[bot] Thank you for raising your pull request and contributing to our Community |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6300 +/- ##
=========================================
Coverage 91.84% 91.85%
=========================================
Files 684 684
Lines 62237 62237
Branches 2906 4334 +1428
=========================================
+ Hits 57162 57166 +4
+ Misses 5075 5071 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
❤️ Great PR @gru-agent[bot] ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
🎉 This PR is included in version 1.61.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…onse.test.ts (lobehub#6300) Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
Trigger Info
Summary
This PR enhances the
createErrorResponse
utility function by adding test cases for additional error types to ensure proper status code mapping. The following changes were made:Added test cases for the following
AgentRuntimeErrorType
error types:InsufficientQuota
(returns 429)QuotaLimitReached
(returns 429)ExceededContextWindow
(returns 400)ProviderBizError
(returns 471)OllamaBizError
(returns 472)Added test cases for the following
ChatErrorType
error types:SystemTimeNotMatchError
(returns 400)OllamaServiceUnavailable
(returns 472)These additions improve test coverage and ensure the function handles a broader range of error scenarios correctly.
Tip
You can
@gru-agent
and leave your feedback. TestGru will make adjustments based on your inputTip
You can
@gru-agent rebase
to rebase the PR.Tip
You can
@gru-agent redo
to reset or rebase before redoing the PR.Tip
To modify the test code yourself, click here Edit Test Code