MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / reason_code

Method reason_code

crates/chat-cli/src/cli/chat/mod.rs:606–622  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

604
605impl ReasonCode for ChatError {
606 fn reason_code(&self) -> String {
607 match self {
608 ChatError::Client(e) => e.reason_code(),
609 ChatError::SendMessage(e) => e.reason_code(),
610 ChatError::ResponseStream(e) => e.reason_code(),
611 ChatError::Std(_) => "StdIoError".to_string(),
612 ChatError::Readline(_) => "ReadlineError".to_string(),
613 ChatError::Custom(_) => "GenericError".to_string(),
614 ChatError::Interrupted { .. } => "Interrupted".to_string(),
615 ChatError::GetPromptError(_) => "GetPromptError".to_string(),
616 ChatError::Auth(_) => "AuthError".to_string(),
617 ChatError::NonInteractiveToolApproval => "NonInteractiveToolApproval".to_string(),
618 ChatError::CompactHistoryFailure => "CompactHistoryFailure".to_string(),
619 ChatError::AgentSwapError(_) => "AgentSwapError".to_string(),
620 ChatError::Conduit(_) => "ConduitError".to_string(),
621 }
622 }
623}
624
625impl From<ApiClientError> for ChatError {

Callers 1

get_error_reasonFunction · 0.45

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected