feat: optimize invoke errors (#1922)

This commit is contained in:
takatost 2024-01-04 17:49:55 +08:00 • committed by GitHub
commit b88a8f7bb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 29 additions and 29 deletions

View file

@ -133,7 +133,7 @@ class UniversalChatMessageSuggestedQuestionApi(UniversalChatResource):
except ModelCurrentlyNotSupportError:
raise ProviderModelCurrentlyNotSupportError()
except InvokeError as e:
raise CompletionRequestError(str(e))
raise CompletionRequestError(e.description)
except Exception:
logging.exception("internal server error.")
raise InternalServerError()