mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
make load_or_create *only* load_or_create
Extracted the other logic to its current singular callsite for now. The load_or_create function finally does nothing other than load or create the database (and do some related checks, which is fine). This paves the way for more/better database surgery tooling.
This commit is contained in:
parent
e9caf228b3
commit
c2c6083277
3 changed files with 56 additions and 52 deletions
12
src/error.rs
12
src/error.rs
|
|
@ -61,6 +61,18 @@ pub(crate) enum ServeCommand {
|
|||
|
||||
#[error("failed to serve requests")]
|
||||
Serve(#[from] Serve),
|
||||
|
||||
#[error("failed to initialize services")]
|
||||
InitializeServices(#[source] crate::utils::error::Error),
|
||||
|
||||
#[error("failed to check if there are any users")]
|
||||
NonZeroUsers(#[source] crate::utils::error::Error),
|
||||
|
||||
#[error("failed to check if the admin bot exists")]
|
||||
AdminBotExists(#[source] crate::utils::error::Error),
|
||||
|
||||
#[error("`server_name` in the database and config file differ")]
|
||||
Renamed,
|
||||
}
|
||||
|
||||
/// Observability initialization errors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue