Skip to content

Commit

Permalink
More error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdxsd committed Dec 22, 2023
1 parent a0be8f6 commit 2cf1058
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/subtitlecorrector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 2cf1058

Please sign in to comment.