报错优化
This commit is contained in:
+288
-143
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@ export class EmotionAIService {
|
||||
error as Error,
|
||||
ErrorType.API_ERROR,
|
||||
{ config: { ...emotionConfig, apiKey: "***" } }, // 隐藏API密钥
|
||||
true
|
||||
false
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ export class EmotionAIService {
|
||||
new Error(warningMsg),
|
||||
ErrorType.API_ERROR,
|
||||
{ roleId, message, response },
|
||||
true
|
||||
false
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -102,10 +102,10 @@ export class ErrorHandler {
|
||||
requestData,
|
||||
responseError: error,
|
||||
};
|
||||
if (error.status == "FAILED_PRECONDITION") {
|
||||
if (details.responseError.message.includes("FAILED_PRECONDITION")) {
|
||||
//当前用户区域不支持聊天功能
|
||||
TipsPanel.show(LanguageUtils.getText("chat_error_code_2003"));
|
||||
} else if (error.message.includes("Fetch is aborted")) {
|
||||
} else if (error.message.includes("aborted")) {
|
||||
TipsPanel.show(LanguageUtils.getText("chat_error_code_2004"));
|
||||
} else {
|
||||
this.handleError(
|
||||
|
||||
@@ -486,8 +486,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 807.6796875,
|
||||
"height": 50.4
|
||||
"width": 1009.279688,
|
||||
"height": 112.7
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -525,11 +525,11 @@
|
||||
"_string": "Insufficient balance, need to purchase",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 48,
|
||||
"_actualFontSize": 49,
|
||||
"_fontSize": 48,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 40,
|
||||
"_overflow": 0,
|
||||
"_overflow": 2,
|
||||
"_enableWrapText": true,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
@@ -673,6 +673,7 @@
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "630e3mesJKuZJC9gpYcm7p",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user