1#[derive(Debug, thiserror::Error)]
5pub enum Error {
6 #[error("Request failed: {0}")]
8 RequestFailed(String),
9
10 #[error("No pool available. Have you initialized the HostPool or already shut it down?")]
12 NoPool,
13}
14
15impl From<Error> for wapc::errors::Error {
16 fn from(e: Error) -> Self {
17 wapc::errors::Error::General(e.to_string())
18 }
19}
20
21#[cfg(test)]
22mod tests {
23 #[allow(dead_code)]
24 fn needs_sync_send<T: Send + Sync>() {}
25
26 #[test]
27 fn assert_sync_send() {
28 needs_sync_send::<super::Error>();
29 }
30}