module Saorin
Constants
- JSON_RPC_ERRORS
code message meaning -32700 Parse error Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. -32600 Invalid
Request
The JSON sent is not a validRequest
object. -32601 Method not found The method does not exist / is not available. -32602 Invalid params Invalid method parameter(s). -32603 Internal error Internal JSON-RPC error. -32000 to -32099Server
error Reserved for implementation-defined server-errors.- JSON_RPC_VERSION
- VERSION
Public Class Methods
code_to_error(code)
click to toggle source
# File lib/saorin/error.rb, line 65 def code_to_error(code) case code when nil nil when (-32099..-32000) ServerError else @error_code_map ||= Hash[JSON_RPC_ERRORS.map { |c, n, m| [c, const_get(n)] }] @error_code_map[code] || UserDefinedError end end