Exception: A2A::VersionNotSupportedError
- Defined in:
- lib/a2a/errors.rb
Overview
The A2A protocol version specified in the request (via A2A-Version service parameter) is not supported by the agent.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
- #error_data ⇒ Object
-
#initialize(version = nil, message: "Version not supported") ⇒ VersionNotSupportedError
constructor
A new instance of VersionNotSupportedError.
Methods inherited from Error
Constructor Details
#initialize(version = nil, message: "Version not supported") ⇒ VersionNotSupportedError
Returns a new instance of VersionNotSupportedError.
199 200 201 202 |
# File 'lib/a2a/errors.rb', line 199 def initialize(version = nil, message: "Version not supported") @version = version super(, code: -32009, http_status: 400) end |
Instance Method Details
#error_data ⇒ Object
204 205 206 207 208 209 210 211 212 213 |
# File 'lib/a2a/errors.rb', line 204 def error_data = {} ["version"] = @version.to_s if @version [{ "@type" => "type.googleapis.com/google.rpc.ErrorInfo", "reason" => "VERSION_NOT_SUPPORTED", "domain" => "a2a-protocol.org", "metadata" => , }] end |