Skip to content

Commit be79004

Browse files
committed
Add reserved range endpoints as constants
1 parent 416a4e8 commit be79004

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/core.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ Internal JSON-RPC error.
5252
"""
5353
const INTERNAL_ERROR = -32603
5454

55+
# these are the reserved endpoints of JSON-RPC error codes
56+
const SERVER_ERROR_END = -32000
57+
const SERVER_ERROR_START = -32099
58+
5559
"""
5660
RPCErrorStrings
5761
@@ -65,7 +69,7 @@ const RPCErrorStrings = Base.IdDict(
6569
METHOD_NOT_FOUND => "MethodNotFound",
6670
INVALID_PARAMS => "InvalidParams",
6771
INTERNAL_ERROR => "InternalError",
68-
[ i => "ServerError" for i in -32099:-32000]...,
72+
[ i => "ServerError" for i in SERVER_ERROR_START:SERVER_ERROR_END]...,
6973
# TODO: these should be removed - they are in the application/implementation specific range
7074
-32000 => "serverErrorEnd",
7175
-32099 => "serverErrorStart",

0 commit comments

Comments
 (0)