openai_interface/
errors.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum RequestError {
5 #[error("Invalid response code: {0}")]
6 ResponseCode(u16),
7 #[error("Invalid response status: {0}")]
8 ResponseStatus(u16),
9 #[error("Failed to parse to String: {0}")]
10 SseParseError(String),
11 #[error("{0}")]
12 StreamError(String),
13}
14
15#[derive(Debug, Error)]
16pub enum ResponseError {
17 #[error("Deserialization error:\n{0}\n\nPlease report this error to the project issue.")]
18 DeserializationError(String),
19}