Nathan.fooo 12d6cbd46a
chore: optimize the UI if fail to open the workspace (#3246)
* chore: async load user profile

* chore: enable reset workspace

* chore: add confirm dialog
2023-08-22 00:19:15 +08:00

15 lines
344 B
Rust

use std::convert::TryInto;
use bytes::Bytes;
use lib_dispatch::prelude::{AFPluginEventResponse, ResponseBuilder};
use crate::FlowyError;
impl lib_dispatch::Error for FlowyError {
fn as_response(&self) -> AFPluginEventResponse {
let bytes: Bytes = self.clone().try_into().unwrap();
ResponseBuilder::Err().data(bytes).build()
}
}