#[non_exhaustive]pub enum A2AError {
Http(String),
Parse(String),
Api {
code: i32,
message: String,
},
Timeout(String),
Signature(String),
InputRequired {
task_id: String,
prompt: String,
},
}Expand description
Errors that can occur during A2A client operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Http(String)
HTTP transport error.
Parse(String)
JSON parse error.
Api
API-level error (returned by the remote agent).
Timeout(String)
Request timed out.
Signature(String)
Agent card signature verification failed, or a signed card could not be verified (P1-3).
InputRequired
The agent needs more information before it can continue (P2-3).
Resume the conversation with A2AClient::resume_task.
Trait Implementations§
Source§impl Error for A2AError
impl Error for A2AError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<A2AError> for GatewayError
impl From<A2AError> for GatewayError
Source§impl From<A2AErrorData> for A2AError
impl From<A2AErrorData> for A2AError
Source§fn from(err: A2AErrorData) -> Self
fn from(err: A2AErrorData) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for A2AError
impl RefUnwindSafe for A2AError
impl Send for A2AError
impl Sync for A2AError
impl Unpin for A2AError
impl UnsafeUnpin for A2AError
impl UnwindSafe for A2AError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more