From 0ec636a868fd88882e5d4249cb97f94c416e5242 Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 22 Mar 2024 06:53:40 +0100 Subject: [PATCH] fix: sqlite returns runtime error, catch it prob too wide but i wanna use sqlite --- src/activitypub/user.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/activitypub/user.rs b/src/activitypub/user.rs index 5d145ec2..9c0d9a3b 100644 --- a/src/activitypub/user.rs +++ b/src/activitypub/user.rs @@ -184,6 +184,7 @@ pub async fn inbox( }; match model::like::Entity::insert(like).exec(ctx.db()).await { Err(sea_orm::DbErr::RecordNotInserted) => Err(StatusCode::NOT_MODIFIED), + Err(sea_orm::DbErr::Exec(_)) => Err(StatusCode::NOT_MODIFIED), // bad fix for sqlite Err(e) => { tracing::error!("unexpected error procesing like from {aid} to {oid}: {e}"); Err(StatusCode::INTERNAL_SERVER_ERROR)