README.md: remove reference to Replier - #37
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the example handler signature in the README.md to return a result and an error directly, rather than using a Replier. The review feedback correctly notes that the surrounding explanatory text in the README should also be updated to reflect this change.
As of a685e84, the Replier no longer exists. Including it in the README is confusing. This updates the README to reference the modern Handler type.
c3334da to
42a328c
Compare
There was a problem hiding this comment.
Pull request overview
Updates the project README to reflect the current server-side API by removing the obsolete Replier reference and documenting the direct-return Handler shape used by HandlerServer/Serve.
Changes:
- Reworded the
HandlerServer + Servesection to describe direct-return request handling. - Updated the server example handler signature and return style to match the modern
Handlertype.
Suppressed comments (2)
README.md:144
- This example comment still refers to “reply”, but the Handler API is now direct-return. Updating the wording will keep the example consistent with the API.
// Decode params, do work, reply with a typed result.
README.md:149
- In the direct-return Handler contract, returning a non-nil error for a notification fails the connection. As written, an unknown notification method would close the connection; the example should drop unknown notifications and only return ErrMethodNotFound for calls (similar to MethodNotFoundHandler).
default:
// Answer unknown calls with the standard error.
return nil, jsonrpc2.ErrMethodNotFound
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@nelsam Temporarily close to trigger the CI process. |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #37 +/- ##
=====================================
Coverage 82.0% 82.1%
=====================================
Files 29 29
Lines 4100 4100
=====================================
+ Hits 3366 3367 +1
+ Misses 734 733 -1
|
|
Okay, CI has fired. |
2582438 to
642d0fa
Compare
Co-authored-by: GitHub Copilot <198982749+Copilot@users.noreply.github.com>
642d0fa to
f8c3352
Compare
As of a685e84, the Replier no longer exists. Including it in the README is confusing. This updates the README to reference the modern Handler type.