shell_gpt/
errors.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum ShellGptError {
5    #[error("Could not find the OpenAI API key")]
6    ApiKeyMissing,
7    #[error("The provided OpenAI API key is an empty string")]
8    ApiKeyEmpty,
9    #[error("There was an error when calling the OpenAI API: {0}")]
10    ApiError(String),
11
12    #[error("Unknown error")]
13    Unknown,
14}