Use the STT provider's exception message in the RuntimeException that will be caught by upper contexts

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
pull/43548/head
Julien Veyssier 4 months ago
parent 3fb1674251
commit 6580bef319
No known key found for this signature in database
GPG Key ID: 4141FEE162030638

@ -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());
}
}

Loading…
Cancel
Save