Skip to main content

Web Procotols

JSON-RPC

Grove API supports all blochchains that use the JSON-RPC 2.0 Specification.

With the implementation of PATH, Grove has implemented an opinonated implementation of HTTP Status codes on JSON-RPC:

JSON-RPC to HTTP Status Code Mapping

It's common practice in JSON-RPC-over-HTTP implementations to map:

  • Client errors (e.g., -32600 Invalid Request) to 4xx HTTP statuses
  • Server errors (e.g., -32603 Internal error or -32000 "Server error") to 5xx HTTP statuses

PATH follows this practice and maps JSON-RPC errors to HTTP status codes as follows:

JSON-RPC Error CodeCommon MeaningHTTP Status Code
-32700Parse error400 Bad Request
-32600Invalid request400 Bad Request
-32601Method not found404 Not Found
-32602Invalid params400 Bad Request
-32603Internal error500 Server Error
-32098Timeout504 Gateway Timeout
-32097Rate limited429 Too Many Requests
-32000…-32099Server error range500 Server Error
> 0Application errors (client-side)400 Bad Request
< 0 (other negative)Application errors (server-side)500 Server Error

REST

Grove API is able to support any RESTful API configuration. Services that utilize a RESTful API will be provided in accordance with their individual specifications.

WebSockets

Coming Soon!