2023-05-25 14:55:20 +02:00
|
|
|
use sea_orm::error::DbErr;
|
|
|
|
|
2023-06-02 17:55:14 +02:00
|
|
|
use crate::impl_into_napi_error;
|
|
|
|
|
2023-05-26 03:40:04 +02:00
|
|
|
#[derive(thiserror::Error, Debug, PartialEq, Eq)]
|
2023-05-25 14:55:20 +02:00
|
|
|
pub enum Error {
|
|
|
|
#[error("The database connections have not been initialized yet")]
|
|
|
|
Uninitialized,
|
|
|
|
#[error("ORM error: {0}")]
|
|
|
|
OrmError(#[from] DbErr),
|
|
|
|
}
|
2023-06-02 17:55:14 +02:00
|
|
|
|
|
|
|
impl_into_napi_error!(Error);
|