1212 handle ( req , token_info )
1313}
1414
15+ # @param req [Syntropy::Request]
1516def valid_token? ( req )
1617 token = req . auth_bearer_token
1718 return false if !token
@@ -50,7 +51,7 @@ def handle(req, token_info)
5051
5152 send ( sym , req , json , token_info )
5253rescue Syntropy ::ValidationError => e
53- if ( m = e . message . match ( < /(.+)\: (.+)/ ) )
54+ if ( m = e . message . match ( /(.+)\: (.+)/ ) )
5455 type , message = m [ 1 ] , m [ 2 ]
5556 else
5657 type , message = 'INVALID_REQUEST' , e . message
@@ -59,10 +60,10 @@ def handle(req, token_info)
5960end
6061
6162ERROR_CODES = {
62- 'INVALID_REQUEST' => -32600
63- 'METHOD_NOT_FOUND' => -32601
64- 'INVALID_PARAMS' => -32602
65- 'INTERNAL_ERROR' => -32603
63+ 'INVALID_REQUEST' => -32600 ,
64+ 'METHOD_NOT_FOUND' => -32601 ,
65+ 'INVALID_PARAMS' => -32602 ,
66+ 'INTERNAL_ERROR' => -32603 ,
6667 'PARSE_ERROR' => -32700
6768}
6869
@@ -80,6 +81,5 @@ def respond_error(req, json, error_type, error_message)
8081 )
8182end
8283
83- def handle_initialize (
84-
85- )
84+ def handle_initialize ( )
85+ end
0 commit comments