Skip to content

Commit 7a6387d

Browse files
authored
fix(JsonRpcError): data can be of any type (#36)
1 parent 81fe7a4 commit 7a6387d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class JsonRpcError extends BaseError {
1010
constructor (
1111
message = 'unknown error from the peer',
1212
code = -32000,
13-
data?: string
13+
data?: any
1414
) {
1515
super(message)
1616

src/json-rpc.type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export type PayloadType =
5656
// <-- {"jsonrpc": "2.0", "error": {"code": -32600, "message": "Invalid Request"}, "id": null}
5757
export interface JsonRpcErrorSchema {
5858
code: number
59-
data?: string
59+
data?: any
6060
message: string
6161
}
6262

0 commit comments

Comments
 (0)