Returns `true` if this error is a session state machine violation that might indicate a crashed or interrupted agent.
(&self)
| 376 | /// Returns `true` if this error is a session state machine violation |
| 377 | /// that might indicate a crashed or interrupted agent. |
| 378 | pub fn is_state_violation(&self) -> bool { |
| 379 | matches!( |
| 380 | self, |
| 381 | AgentError::TurnNotActive { .. } |
| 382 | | AgentError::TurnAlreadyActive { .. } |
| 383 | | AgentError::SessionEnded { .. } |
| 384 | ) |
| 385 | } |
| 386 | |
| 387 | /// Returns a user-facing suggestion for how to fix the error, if applicable. |
| 388 | pub fn suggestion(&self) -> Option<&'static str> { |
nothing calls this directly
no outgoing calls
no test coverage detected