🥅(backend) add broad exception handling for non-twirp error in recording

Implement broad exception handling to catch any non-twirp errors
during recording operations. Ensures recording status is properly reset to
"failed to start" when errors occur, allowing users to retry the recording
while still logging errors to Sentry for investigation.

It's generally a bad practice, however in this case it's fine, I am
catching exception beforehand and it only acts as a fallback.
This commit is contained in:
lebaudantoine
2025-04-25 12:55:06 +02:00
committed by aleb_the_flash
parent 422f838899
commit bcb004ab4b

View File

@@ -41,6 +41,10 @@ class BaseEgressService:
raise WorkerConnectionError(
f"LiveKit client connection error, {e.message}."
) from e
except Exception as e:
raise WorkerConnectionError(
f"Unexpected error during LiveKit client connection: {str(e)}"
) from e
finally:
await lkapi.aclose()