From 2cf1058ec759dfe4b2474a5852e87b42b7128010 Mon Sep 17 00:00:00 2001 From: sdxsd Date: Fri, 22 Dec 2023 16:02:29 +0100 Subject: [PATCH] More error handling. --- src/subtitlecorrector.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/subtitlecorrector.py b/src/subtitlecorrector.py index dd62989..eef42d7 100644 --- a/src/subtitlecorrector.py +++ b/src/subtitlecorrector.py @@ -150,6 +150,12 @@ async def handle_exceptions(self, exception): return (exception.query_str) case 'API_connection': return (exception.query_str) + case 'API_authentication': + return (exception.query_str) + case 'API_malformed_request': + return (exception.query_str) + case 'API_permission_denied': + return (exception.query_str) def validate_finish_reason(self, finish_reason, query_number): if finish_reason != "stop":