minor cleanup with traits

This commit is contained in:
Evan Carroll 2026-01-23 18:27:54 -06:00
parent 73f9c95e37
commit 8a37a7b2da
17 changed files with 81 additions and 71 deletions

View file

@ -4,7 +4,7 @@ use sqlx::PgExecutor;
use uuid::Uuid;
use crate::models::{CreateSceneRequest, Scene, SceneSummary, UpdateSceneRequest};
use chattyness_error::AppError;
use chattyness_error::{AppError, OptionExt};
/// List all scenes for a realm.
pub async fn list_scenes_for_realm<'e>(
@ -374,7 +374,7 @@ pub async fn update_scene<'e>(
let scene = query_builder
.fetch_optional(executor)
.await?
.ok_or_else(|| AppError::NotFound("Scene not found".to_string()))?;
.or_not_found("Scene")?;
Ok(scene)
}