Skip to content

Commit

Permalink
forward hunyuan error
Browse files Browse the repository at this point in the history
  • Loading branch information
sdcb committed Dec 5, 2024
1 parent 34ef260 commit 0aed864
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Sdcb.DashScope;
using System.ClientModel;
using System.Text.Json;
using TencentCloud.Common;
using OpenAIChatMessage = OpenAI.Chat.ChatMessage;

namespace Chats.BE.Controllers.Chats.Conversations;
Expand Down Expand Up @@ -184,7 +185,7 @@ ..await GetMessageTree(existingMessages, messageId).ToAsyncEnumerable().SelectAw
icc.FinishReason = cse.ErrorCode;
return this.BadRequestMessage(cse.Message);
}
catch (Exception e) when (e is DashScopeException || e is ClientResultException)
catch (Exception e) when (e is DashScopeException or ClientResultException or TencentCloudSDKException)
{
icc.FinishReason = DBFinishReason.UpstreamError;
errorText = e.Message;
Expand Down

0 comments on commit 0aed864

Please sign in to comment.