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