ibm_watson/text-to-speech/voices/
errors.rs1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum ListVoicesError {
8 #[error("The request specified an Accept header with an incompatible content type.")]
9 NotAcceptable406, #[error("The request specified an unacceptable media type.")]
12 UnsupportedMediaType415, #[error("The service experienced an internal error.")]
15 InternalServerError500, #[error("The service is currently unavailable.")]
18 ServiceUnavailable503, #[error("{0}")]
21 ConnectionError(String),
23}
24
25#[derive(Error, Debug)]
26pub enum GetVoiceError {
30 #[error("The requested resource has not been modified since the time specified by the If-Modified-Since header, as documented in the HTTP specification")]
31 NotModified304,
33 #[error("A required input parameter is null or a specified input parameter or header value is invalid or not supported. Please check your customisation id")]
34 BadRequest400,
36 #[error("The specified customisation_id {0} is invalid for the requesting credentials")]
37 Unauthorised401(String),
39 #[error("The request specified an Accept header with an incompatible content type.")]
40 NotAcceptable406,
42 #[error("The request specified an unacceptable media type.")]
43 UnsupportedMediaType415,
45 #[error("The service experienced an internal error.")]
46 InternalServerError500,
48 #[error("The service is currently unavailable.")]
49 ServiceUnavailable503,
51 #[error("{0}")]
52 ConnectionError(String),
54}