From f578b9f9f68fad62acff009b5109cfbd55e8ca6f Mon Sep 17 00:00:00 2001 From: Aiden <31586885+Aiden-FE@users.noreply.github.com> Date: Thu, 11 May 2023 14:49:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9C=AA=E6=8A=9B=E5=87=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Aiden-FE --- apps/compass-service/src/modules/ai/ai.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/compass-service/src/modules/ai/ai.service.ts b/apps/compass-service/src/modules/ai/ai.service.ts index 2afb66e..6fabca6 100644 --- a/apps/compass-service/src/modules/ai/ai.service.ts +++ b/apps/compass-service/src/modules/ai/ai.service.ts @@ -21,7 +21,7 @@ export class AIService { if (!userProfile.aiBalance) { return new HttpResponse(null, { statusCode: ResponseCode.PAYMENT_REQUIRED, - message: '当前用户不存在可用额度', + message: '当前用户不存在可用额度,请联系管理员增加', }); } const openAI = this.getOpenAI(); @@ -55,7 +55,7 @@ export class AIService { content = resp?.data.choices.pop().message?.content; } } catch (e) { - return new HttpResponse({ + throw new HttpResponse({ statusCode: ResponseCode.BAD_REQUEST, message: e?.message || e?.toString() || e, });