Skip to content

jsonrpc.DefaultErrorEncoder does not meet JSON RPC v2.0 specification #959

@ghost

Description

From response specification (https://www.jsonrpc.org/specification):

Id
This member is REQUIRED.
It MUST be the same as the value of the id member in the Request Object.
If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null.

Currently, DefaultErrorEncoder is set to nil:

	_ = json.NewEncoder(w).Encode(Response{
		JSONRPC: Version,
		Error:   &e,
	})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions