Exception: A2A::InvalidAgentResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/a2a/errors.rb

Overview

An agent returned a response that does not conform to the specification for the current method.

Instance Attribute Summary

Attributes inherited from Error

#code, #http_status

Instance Method Summary collapse

Methods inherited from Error

#to_h

Constructor Details

#initialize(message: "Invalid agent response") ⇒ InvalidAgentResponseError

Returns a new instance of InvalidAgentResponseError.



147
148
149
# File 'lib/a2a/errors.rb', line 147

def initialize(message: "Invalid agent response")
  super(message, code: -32006, http_status: 500)
end

Instance Method Details

#error_dataObject



151
152
153
154
155
156
157
# File 'lib/a2a/errors.rb', line 151

def error_data
  [{
    "@type"  => "type.googleapis.com/google.rpc.ErrorInfo",
    "reason" => "INVALID_AGENT_RESPONSE",
    "domain" => "a2a-protocol.org",
  }]
end