1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use crate::json::errors::JsonError;
use thiserror::Error;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Error, Debug)]
pub enum Error {
#[error("JSON serialization error: {0}")]
JsonSerializationError(#[from] serde_json::error::Error),
#[error("HTTP I/O error: {0}")]
HttpIoError(#[from] reqwest::Error),
#[error("Pandora API error: {0}")]
PandoraJsonRequestError(#[from] JsonError),
#[error("Invalid/unsupported audio format: {0}")]
InvalidAudioFormat(String),
#[error("Invalid/unsupported gender value: {0}")]
InvalidUserGender(String),
}