Minor frontend improvements, feature to create calendar

This commit is contained in:
Lennart
2025-06-08 21:46:20 +02:00
parent bbe9113f5c
commit 573781310a
8 changed files with 165 additions and 10 deletions

View File

@@ -1,3 +1,5 @@
use tracing::warn;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
@@ -16,6 +18,7 @@ impl From<sqlx::Error> for Error {
sqlx::Error::RowNotFound => Error::StoreError(rustical_store::Error::NotFound),
sqlx::Error::Database(err) => {
if err.is_unique_violation() {
warn!("{err:?}");
Error::StoreError(rustical_store::Error::AlreadyExists)
} else {
Error::SqlxError(sqlx::Error::Database(err))