feat: optimize invoke errors (#1922)

This commit is contained in:
takatost
2024-01-04 17:49:55 +08:00
committed by GitHub
parent b4225bedb5
commit b88a8f7bb1
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()