Added minimal sdk, simplified test using the sdk's client
This commit is contained in:
parent
a75c115761
commit
84784599a7
16 changed files with 379 additions and 83 deletions
20
ubisync-sdk/src/error.rs
Normal file
20
ubisync-sdk/src/error.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
use std::fmt::Display;
|
||||
|
||||
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum UbisyncError {
|
||||
InvalidNodeReply(String),
|
||||
AppRegistrationFailed,
|
||||
}
|
||||
|
||||
impl Display for UbisyncError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::InvalidNodeReply(msg) => write!(f, "Invalid reply from ubisync node: {}", msg),
|
||||
Self::AppRegistrationFailed => write!(f, "Registrating this app at the ubisync node failed."),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for UbisyncError {}
|
Loading…
Add table
Add a link
Reference in a new issue