diff --git a/tts_service/src/endpoints/speak.rs b/tts_service/src/endpoints/speak.rs index 6653c7ff0f..86fc5ba12b 100644 --- a/tts_service/src/endpoints/speak.rs +++ b/tts_service/src/endpoints/speak.rs @@ -28,8 +28,9 @@ pub struct SpeakRequest { pub async fn post_speak(request: HttpRequest, query: Json, - app_state: Data> -) -> std::io::Result { + app_state: Data>) + -> std::io::Result +{ let app_state = app_state.into_inner(); let speaker_slug = query.speaker.to_string(); @@ -65,7 +66,8 @@ pub async fn post_speak(request: HttpRequest, }; match sentence_record.insert(&app_state.database_connector) { - Err(_) => error!("Could not insert sentence record for: {:?}", sentence_record), + Err(e) => error!("Could not insert sentence record for: {:?}, because: {:?}", + sentence_record, e), Ok(_) => {}, } diff --git a/tts_service/src/endpoints/speak_with_spectrogram.rs b/tts_service/src/endpoints/speak_with_spectrogram.rs index 0f00bc77a4..6254b2f677 100644 --- a/tts_service/src/endpoints/speak_with_spectrogram.rs +++ b/tts_service/src/endpoints/speak_with_spectrogram.rs @@ -86,7 +86,8 @@ pub async fn post_speak_with_spectrogram(request: HttpRequest, }; match sentence_record.insert(&app_state.database_connector) { - Err(_) => error!("Could not insert sentence record for: {:?}", sentence_record), + Err(e) => error!("Could not insert sentence record for: {:?}, because: {:?}", + sentence_record, e), Ok(_) => {}, }