Remove ContentTypeDecode error variant
This commit is contained in:
@ -36,8 +36,6 @@ pub enum GolgiError {
|
||||
Sbot(String),
|
||||
/// JSON serialization or deserialization error.
|
||||
SerdeJson(JsonError),
|
||||
/// Error decoding typed ssb message from content.
|
||||
ContentTypeDecode(String),
|
||||
/// Error decoding UTF8 string from bytes
|
||||
Utf8Parse {
|
||||
/// The underlying parse error.
|
||||
@ -56,7 +54,6 @@ impl std::error::Error for GolgiError {
|
||||
GolgiError::Rpc(ref err) => Some(err),
|
||||
GolgiError::Sbot(_) => None,
|
||||
GolgiError::SerdeJson(ref err) => Some(err),
|
||||
GolgiError::ContentTypeDecode(_) => None,
|
||||
GolgiError::Utf8Parse{ ref source} => Some(source),
|
||||
}
|
||||
}
|
||||
@ -77,11 +74,6 @@ impl std::fmt::Display for GolgiError {
|
||||
GolgiError::Sbot(ref err) => write!(f, "Sbot returned an error response: {}", err),
|
||||
GolgiError::SerdeJson(_) => write!(f, "Failed to serialize JSON slice"),
|
||||
//GolgiError::WhoAmI(ref err) => write!(f, "{}", err),
|
||||
GolgiError::ContentTypeDecode(ref err) => write!(
|
||||
f,
|
||||
"Failed to decode typed message from ssb message content: {}",
|
||||
err
|
||||
),
|
||||
GolgiError::Utf8Parse{ source } => write!(f, "Failed to deserialize UTF8 from bytes: {}", source),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user