ibm_watson/text-to-speech/pronunciation/errors.rs
1use thiserror::Error;
2
3#[derive(Error, Debug)]
4/// Errors that may be returned in pronunciation requests
5pub enum PronunciationError {
6 /// The requested resource has not been modified since the time specified by the If-Modified-Since header, as documented in the HTTP specification
7 #[error("The requested resource has not been modified since the time specified by the If-Modified-Since header, as documented in the HTTP specification")]
8 NotModified304,
9 #[error("The request specified an Accept header with an incompatible content type.")]
10 /// The request specified an Accept header with an incompatible content type
11 NotAcceptable406,
12 #[error("A required input parameter is null or a specified input parameter or header value is invalid or not supported")]
13 /// A required input parameter is null or a specified input parameter or header value is invalid or not supported
14 BadRequest400,
15 #[error("The specified customisation_id: {0} is invalid for the requesting credentials")]
16 /// The specified customisation_id is invalid for the requesting credentials
17 Unuathorised401(String),
18 #[error("The specified voice does not exist")]
19 /// The specified voice does not exist or, for IBM Cloud Pak for Data, the voice parameter was not specified but the default voice is not installed. The message is Model '{voice}' not found
20 NotFound404,
21 // #[error("The request specified an unacceptable media type.")]
22 // UnsupportedMediaType415,
23 #[error("The service experienced an internal error.")]
24 /// The service experienced an internal error.
25 InternalServerError500,
26 /// The service is currently unavailable
27 #[error("The service is currently unavailable.")]
28 ServiceUnavailable503,
29 #[error("{0}")]
30 /// There was an error making the request
31 ConnectionError(String),
32}