feat!: wrap Client::new() return in a Result

BREAKING CHANGE: `Client::new()` now returns a `Result`.
This commit is contained in:
Ivan Gabriele
2024-03-04 04:43:16 +01:00
parent 1deab88251
commit 33876183e4
7 changed files with 25 additions and 20 deletions

View File

@@ -12,7 +12,7 @@ impl fmt::Display for ApiError {
}
impl Error for ApiError {}
#[derive(Debug, thiserror::Error)]
#[derive(Debug, PartialEq, thiserror::Error)]
pub enum ClientError {
#[error("You must either set the `MISTRAL_API_KEY` environment variable or specify it in `Client::new(api_key, ...).")]
ApiKeyError,