FRC: JSON-RPC HTTP transport conventions #1247
LesnyRumcajs
started this conversation in
Enhancements - Technical
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
#1248
Simple Summary
This FRC standardizes how Filecoin JSON-RPC 2.0 endpoints map application-level errors to HTTP status codes. It defines a consistent mapping so that HTTP clients can detect error conditions from the status code alone, without parsing the full JSON response body.
Abstract
The JSON-RPC 2.0 specification defines application-level error codes but is silent on HTTP transport behavior. FRC-0104 specifies the common JSON-RPC API methods but does not address how errors should be represented at the HTTP layer. This gap has led to divergent behavior across Filecoin node implementations: Forest returns HTTP 200 for all JSON-RPC errors, Lotus returns HTTP 500 for some, and third-party RPC providers each follow their own conventions.
This FRC specifies the HTTP transport conventions for Filecoin JSON-RPC endpoints, including HTTP status code mappings for JSON-RPC error codes, Content-Type requirements, HTTP method handling, batch request behavior, and notification responses. The goal is to enable consistent, predictable behavior across all Filecoin node implementations and RPC providers.
Beta Was this translation helpful? Give feedback.
All reactions