(&self)
| 604 | |
| 605 | impl 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 | |
| 625 | impl From<ApiClientError> for ChatError { |
no test coverage detected