From 6580bef3199b8c9572ee82b4846eded95be00b89 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Tue, 13 Feb 2024 12:51:48 +0100 Subject: [PATCH] Use the STT provider's exception message in the RuntimeException that will be caught by upper contexts Signed-off-by: Julien Veyssier --- lib/private/SpeechToText/SpeechToTextManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/private/SpeechToText/SpeechToTextManager.php b/lib/private/SpeechToText/SpeechToTextManager.php index b455fd811b1..73efe105b38 100644 --- a/lib/private/SpeechToText/SpeechToTextManager.php +++ b/lib/private/SpeechToText/SpeechToTextManager.php @@ -141,6 +141,7 @@ class SpeechToTextManager implements ISpeechToTextManager { return $provider->transcribeFile($file); } catch (\Throwable $e) { $this->logger->info('SpeechToText transcription using provider ' . $provider->getName() . ' failed', ['exception' => $e]); + throw new RuntimeException('SpeechToText transcription using provider "' . $provider->getName() . '" failed: ' . $e->getMessage()); } }