Repository navigation
Update: Added req and res to context parameter of handlers on runMethod - #269
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f7f856a. Configure here.
AtulYadav25
force-pushed
the
update-context-params
branch
from
May 16, 2026 03:05
f7f856a to
7979c56
Compare
omegascorp
approved these changes
May 19, 2026
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.

Added a new type:
In
src/methods/types.tsThis provides guaranteed access to
reqandresin allrunMethodhandlers.runLiveMethodhandlers use sockets, soreqandresare not available there and I intentionally excluded them.--
Instead of manually accessing request data from a generic context, we can use
HttpContextin handlers,Testing
I Tested this update locally, accessing values from
reqinside handlers:Verified that request method and cookies were available and returned expected values.

Note
Medium Risk
Medium risk because it changes the shape and typing of the server-side method context and threads Express
req/resthrough authentication and method execution paths; incorrect assumptions can cause runtime issues for non-HTTP (live) handlers.Overview
Adds an HTTP-specific context type and threads Express request/response through server method execution.
getCallContextnow requiresresand returns aHttpContextthat includesreq/res, and the internal method endpoint passes this through torunMethodso method handlers can access HTTP primitives.OAuth flows were updated to call
getCallContext(req, res), tests were adjusted accordingly, and route handler request params are tightened toRecord<string, string>to match expected handler input.Reviewed by Cursor Bugbot for commit 7979c56. Bugbot is set up for automated code reviews on this repo. Configure here.