Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONRPCResponse: id doesn't allow null #414

Open
zmeyc opened this issue Aug 18, 2020 · 0 comments
Open

JSONRPCResponse: id doesn't allow null #414

zmeyc opened this issue Aug 18, 2020 · 0 comments

Comments

@zmeyc
Copy link

zmeyc commented Aug 18, 2020

Describe the bug

According to https://www.jsonrpc.org/specification section 5 Response object when there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), id MUST be Null.

But in JSONRPCResponse in https://github.com/open-rpc/server-js/blob/master/src/transports/server-transport.ts id is defined as string or undefined:

export interface JSONRPCResponse {
  jsonrpc: string;
  id?: string;
  result?: any;
  error?: JSONRPCErrorObject;
}

Should it be defined as id: string | null instead?

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

No branches or pull requests

1 participant