Closed lambdalisue closed 2 months ago
[!WARNING]
Review failed
The pull request is closed.
This update improves the error handling within the Plugin
class of a Denops service. Specifically, it enhances the call
method to provide more informative error messages when a function call fails. Changes include try-catch blocks to capture and reformat errors, ensuring a more developer-friendly error output. Corresponding updates in the test suite validate these improved error messages.
File | Change Summary |
---|---|
denops/.../service.ts |
Enhanced error handling in the call method of the Plugin class by adding try-catch blocks and detailed error messages. |
denops/.../service_test.ts |
Updated test cases to validate the newly formatted error messages in the call method. |
sequenceDiagram
participant Plugin
participant Dispatcher
participant Error
Plugin->>Dispatcher: dispatcher[fn](...args)
Dispatcher-->>Plugin: Error response
Plugin->>Error: Capture error
Plugin->>Plugin: Format error message
Plugin-->>Error: Throw new error with detailed message
Objective | Addressed | Explanation |
---|---|---|
Better error message for invalid API call (#373) | ✅ |
In the code where errors used to roam,
Now we've structured every home,
With try and catch, we weave the tale,
Clear messages shall now prevail.
Debugging's easier, joy it brings,
For better code, our service sings!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 85.71429%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 90.17%. Comparing base (
3864494
) to head (40c0a34
).
Files | Patch % | Lines |
---|---|---|
denops/@denops-private/service.ts | 85.71% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
args
that may contains sensitive information or massive data
Close #373
Summary by CodeRabbit