Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

451 B
Raw Blame
use crate::FlowyError;
use flowy_sqlite::Error;

impl std::convert::From<flowy_sqlite::Error> for FlowyError {
  fn from(error: flowy_sqlite::Error) -> Self {
    match error {
      Error::NotFound => FlowyError::record_not_found(),
      _ => FlowyError::internal().with_context(error),
    }
  }
}

impl std::convert::From<::r2d2::Error> for FlowyError {
  fn from(error: r2d2::Error) -> Self {
    FlowyError::internal().with_context(error)
  }
}