Exception: Mpp::Extensions::MCP::MalformedCredentialError
- Inherits:
-
StandardError
- Object
- StandardError
- Mpp::Extensions::MCP::MalformedCredentialError
- Extended by:
- T::Sig
- Defined in:
- lib/mpp/extensions/mcp/errors.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
Instance Method Summary collapse
-
#initialize(detail:, message: "Invalid params") ⇒ MalformedCredentialError
constructor
A new instance of MalformedCredentialError.
- #to_jsonrpc_error ⇒ Object
Constructor Details
#initialize(detail:, message: "Invalid params") ⇒ MalformedCredentialError
Returns a new instance of MalformedCredentialError.
90 91 92 93 94 |
# File 'lib/mpp/extensions/mcp/errors.rb', line 90 def initialize(detail:, message: "Invalid params") @detail = T.let(detail, T.untyped) @code = T.let(CODE_MALFORMED_CREDENTIAL, Integer) super() end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
87 88 89 |
# File 'lib/mpp/extensions/mcp/errors.rb', line 87 def code @code end |
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
84 85 86 |
# File 'lib/mpp/extensions/mcp/errors.rb', line 84 def detail @detail end |
Instance Method Details
#to_jsonrpc_error ⇒ Object
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/mpp/extensions/mcp/errors.rb', line 97 def to_jsonrpc_error { "code" => CODE_MALFORMED_CREDENTIAL, "message" => , "data" => { "httpStatus" => HTTP_STATUS_PAYMENT_REQUIRED, "detail" => @detail } } end |