Skip to content

Clarify RPC error handling design in simulation.ts#52

Draft
Copilot wants to merge 1 commit intofix/clean-error-messagesfrom
copilot/sub-pr-51
Draft

Clarify RPC error handling design in simulation.ts#52
Copilot wants to merge 1 commit intofix/clean-error-messagesfrom
copilot/sub-pr-51

Conversation

Copy link

Copilot AI commented Jan 7, 2026

Addressed review feedback on PR #51 regarding error message handling in src/plugin/simulation.ts. The reviewer questioned why RPC error details were removed from the client response.

Context

The current implementation intentionally:

  • Logs full RPC error details (code, message, description/data) to console.error for server-side debugging
  • Returns only a generic "RPC provider error" message to clients to avoid exposing internal implementation details
if (rpcResponse.error) {
  const { code, message, description, data } = rpcResponse.error as any;
  console.error(`[channels] RPC error: code=${code}, message=${message}, detail=${description || data}`);
  throw pluginError('Simulation RPC failed', {
    code: 'SIMULATION_RPC_FAILURE',
    status: HTTP_STATUS.BAD_GATEWAY,
    details: { message: 'RPC provider error' },  // Generic for security
  });
}

Resolution

Confirmed with @tirumerla that this is the intended design. No code changes required.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Address feedback on error messages and RPC details Clarify RPC error handling design in simulation.ts Jan 7, 2026
Copilot AI requested a review from tirumerla January 7, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments