Skip to content

Commit a254ab7

Browse files
committed
Fix missing error codes
1 parent 3d39ca6 commit a254ab7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/shared/protocol.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ export class Protocol<
180180
jsonrpc: "2.0",
181181
id: request.id,
182182
error: {
183-
code: error["code"]
184-
? Math.floor(Number(error["code"]))
183+
code: Number.isSafeInteger(error["code"])
184+
? error["code"]
185185
: ErrorCode.InternalError,
186186
message: error.message ?? "Internal error",
187187
},

0 commit comments

Comments
 (0)