TriportRPC

Invalid params (-32602)

Last updated:

At a glance

Error details
PropertyValue
Code-32602
MessageInvalid params
Categoryjsonrpc

Cause

The method exists but the parameters are wrong: missing required args, wrong order/types, an invalid encoding, or an out-of-range value.

Solution

  1. Match the parameter order and types to the method signature.
  2. Use the correct encoding (`base58`/`base64`/`jsonParsed`).
  3. Validate ranges (slot/limit) before sending.

Example

{
  "id": 1,
  "error": {
    "code": -32602,
    "message": "Invalid params: invalid length"
  },
  "jsonrpc": "2.0"
}

FAQ

Why does "Invalid params" happen?
The method exists but the parameters are wrong: missing required args, wrong order/types, an invalid encoding, or an out-of-range value.
How do I fix "Invalid params"?
Match the parameter order and types to the method signature. Use the correct encoding (`base58`/`base64`/`jsonParsed`). Validate ranges (slot/limit) before sending.
What is RPC error -32602?
-32602 means: Invalid params. The method exists but the parameters are wrong: missing required args, wrong order/types, an invalid encoding, or an out-of-range value.