Skip to content

Commit

Permalink
fix: 修复异常信息未抛出的问题 (#42)
Browse files Browse the repository at this point in the history
Co-authored-by: Aiden-FE <[email protected]>
  • Loading branch information
Aiden-FE and Aiden-FE committed May 11, 2023
1 parent 129991b commit f578b9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/compass-service/src/modules/ai/ai.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class AIService {
if (!userProfile.aiBalance) {
return new HttpResponse(null, {
statusCode: ResponseCode.PAYMENT_REQUIRED,
message: '当前用户不存在可用额度',
message: '当前用户不存在可用额度,请联系管理员增加',
});
}
const openAI = this.getOpenAI();
Expand Down Expand Up @@ -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,
});
Expand Down

0 comments on commit f578b9f

Please sign in to comment.