Module: AgentClientProtocol::ErrorCode
- Defined in:
- lib/agent_client_protocol/error.rb
Constant Summary collapse
- PARSE_ERROR =
-32_700
- INVALID_REQUEST =
-32_600
- METHOD_NOT_FOUND =
-32_601
- INVALID_PARAMS =
-32_602
- INTERNAL_ERROR =
-32_603
- REQUEST_CANCELLED =
-32_800
- AUTH_REQUIRED =
-32_000
- RESOURCE_NOT_FOUND =
-32_002
- DEFAULT_MESSAGES =
{ PARSE_ERROR => "Parse error", INVALID_REQUEST => "Invalid request", METHOD_NOT_FOUND => "Method not found", INVALID_PARAMS => "Invalid params", INTERNAL_ERROR => "Internal error", REQUEST_CANCELLED => "Request cancelled", AUTH_REQUIRED => "Authentication required", RESOURCE_NOT_FOUND => "Resource not found" }.freeze
Class Method Summary collapse
Class Method Details
.default_message(code) ⇒ Object
27 28 29 |
# File 'lib/agent_client_protocol/error.rb', line 27 def (code) DEFAULT_MESSAGES.fetch(code, "Unknown error") end |