pub enum Error {
Auth(String),
Connection(String),
Api(String),
NotFound(String),
RateLimited {
retry_after: Option<Duration>,
},
Tag(String),
Config(String),
}Expand description
An error raised by the engine.
Variants§
Auth(String)
The token was rejected, or no session or JWT could be obtained.
Connection(String)
A transport failure talking to Clerk or the Suno API.
Api(String)
The Suno API returned an unexpected status or body.
NotFound(String)
The Suno API returned 404 Not Found for the requested resource.
Distinct from Api so a caller can treat a genuine absence
(a clip with no parent) as None without also swallowing a transient
5xx, which must surface as a real error.
RateLimited
The Suno API rate-limited the request, with the server’s Retry-After
hint in whole seconds when it sent one (it usually does not).
Tag(String)
Reading or writing audio metadata tags failed.
Config(String)
The config file could not be parsed or failed validation.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more