Skip to content

Commit f31e345

Browse files
committed
fix client spec
1 parent ea681b9 commit f31e345

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/client/src/rpc/error-code.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const INVALID_PARAMS = -32602
77
export const INTERNAL_ERROR = -32603
88
export const TOO_LARGE_REQUEST = -38004
99
export const UNSUPPORTED_FORK = -38005
10+
export const UNKNOWN_PAYLOAD = -32001
1011

1112
export const validEngineCodes = [
1213
PARSE_ERROR,
@@ -16,4 +17,5 @@ export const validEngineCodes = [
1617
INTERNAL_ERROR,
1718
TOO_LARGE_REQUEST,
1819
UNSUPPORTED_FORK,
20+
UNKNOWN_PAYLOAD,
1921
]

packages/client/src/rpc/modules/engine.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
INTERNAL_ERROR,
1818
INVALID_PARAMS,
1919
TOO_LARGE_REQUEST,
20+
UNKNOWN_PAYLOAD,
2021
UNSUPPORTED_FORK,
2122
validEngineCodes,
2223
} from '../error-code'
@@ -110,7 +111,7 @@ type ExecutionPayloadBodyV1 = {
110111

111112
const EngineError = {
112113
UnknownPayload: {
113-
code: -32001,
114+
code: UNKNOWN_PAYLOAD,
114115
message: 'Unknown payload',
115116
},
116117
}

0 commit comments

Comments
 (0)