langchain_rust/llm/claude/
error.rs1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum AnthropicError {
5 #[error("Anthropic API error: Invalid request - {0}")]
6 InvalidRequestError(String),
7
8 #[error("Anthropic API error: Authentication failed - {0}")]
9 AuthenticationError(String),
10
11 #[error("Anthropic API error: Permission denied - {0}")]
12 PermissionError(String),
13
14 #[error("Anthropic API error: Not found - {0}")]
15 NotFoundError(String),
16
17 #[error("Anthropic API error: Rate limit exceeded - {0}")]
18 RateLimitError(String),
19
20 #[error("Anthropic API error: Internal error - {0}")]
21 ApiError(String),
22
23 #[error("Anthropic API error: Overloaded - {0}")]
24 OverloadedError(String),
25}