mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
test: Af cloud workspace member (#3779)
* chore: implement workspace memeber events * chore: add workspace member test * chore: fix fmt
This commit is contained in:
@ -3,6 +3,7 @@ use std::fmt::Debug;
|
||||
|
||||
use protobuf::ProtobufError;
|
||||
use thiserror::Error;
|
||||
use validator::{ValidationError, ValidationErrors};
|
||||
|
||||
use flowy_derive::ProtoBuf;
|
||||
|
||||
@ -132,6 +133,18 @@ impl std::convert::From<protobuf::ProtobufError> for FlowyError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ValidationError> for FlowyError {
|
||||
fn from(value: ValidationError) -> Self {
|
||||
FlowyError::new(ErrorCode::InvalidParams, value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ValidationErrors> for FlowyError {
|
||||
fn from(value: ValidationErrors) -> Self {
|
||||
FlowyError::new(ErrorCode::InvalidParams, value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<anyhow::Error> for FlowyError {
|
||||
fn from(e: anyhow::Error) -> Self {
|
||||
e.downcast::<FlowyError>()
|
||||
|
Reference in New Issue
Block a user