Merge remote-tracking branch 'origin/main' into fix/gateway-timeout-layer

This commit is contained in:
fettpl 2026-02-15 02:15:28 +01:00
commit 0247ac13e8
11 changed files with 1257 additions and 128 deletions

View file

@ -306,7 +306,8 @@ async fn handle_webhook(
(StatusCode::OK, Json(body))
}
Err(e) => {
let err = serde_json::json!({"error": format!("LLM error: {e}")});
tracing::error!("LLM error: {e:#}");
let err = serde_json::json!({"error": "Internal error processing your request"});
(StatusCode::INTERNAL_SERVER_ERROR, Json(err))
}
}
@ -409,8 +410,10 @@ async fn handle_whatsapp_message(State(state): State<AppState>, body: Bytes) ->
}
}
Err(e) => {
tracing::error!("LLM error for WhatsApp message: {e}");
let _ = wa.send(&format!("⚠️ Error: {e}"), &msg.sender).await;
tracing::error!("LLM error for WhatsApp message: {e:#}");
let _ = wa
.send("Sorry, I couldn't process your message right now.", &msg.sender)
.await;
}
}
}