batch_mode_batch_client/
errors.rs

1// ---------------- [ File: src/errors.rs ]
2crate::ix!();
3
4error_tree!{
5
6    pub enum BatchDownloadError {
7        BatchFailed             { batch_id: String },
8        BatchStillProcessing    { batch_id: String },
9        ErrorFileAlreadyExists  { triple: BatchFileTriple },
10        OutputFileAlreadyExists { triple: BatchFileTriple },
11        UnknownBatchStatus      { batch_id: String, status:   BatchStatus, },
12        BatchMetadataError(BatchMetadataError),
13        IoError(std::io::Error),
14        OpenAIClientError(OpenAIClientError),
15    }
16
17    pub enum OpenAIClientError {
18        OpenAIError(OpenAIError),
19        ApiError(OpenAIApiError),
20    }
21}