Handle client errors properly in np module#36
Closed
SasinduDilshara wants to merge 3 commits intoballerina-platform:mainfrom
Closed
Handle client errors properly in np module#36SasinduDilshara wants to merge 3 commits intoballerina-platform:mainfrom
SasinduDilshara wants to merge 3 commits intoballerina-platform:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your project status has failed because the head coverage (61.41%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #36 +/- ##
==========================================
- Coverage 63.79% 61.41% -2.39%
==========================================
Files 6 7 +1
Lines 174 184 +10
Branches 50 51 +1
==========================================
+ Hits 111 113 +2
- Misses 63 71 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
MaryamZi
reviewed
Mar 18, 2025
| // under the License. | ||
|
|
||
| const JSON_CONVERSION_ERROR = "FromJsonStringError"; | ||
| const ERROR_MESSAGE = "Error occurred while converting the LLM response to the given type. Please refined your prompt to get a better result."; |
Member
There was a problem hiding this comment.
This error isn't correct.
- This parsing can fail due to a number of reasons - the LLM didn't respond in the specified format but with correct info, the LLM responds with something random, etc. If it is the first, this error doesn't make sense. Even in the second case, it may or may not be a prompt issue. I would go with a generic error and include the detail message from the original error in this error.
- Will go away, but Refined -> Refine
Contributor
Author
There was a problem hiding this comment.
will do that
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.
Handle client errors properly in np module when parsing errors occured
Fixes ballerina-platform/ballerina-library#7695