1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

#153 print error on bot create

This commit is contained in:
Hai Liang Wang 2018-11-16 13:47:48 +08:00
parent 8e5e44ab3f
commit fcae7c655e
2 changed files with 4 additions and 2 deletions

View File

@ -281,10 +281,12 @@ public class ApiChatbotController extends Handler {
return resp;
}
} catch (ChatbotException e) {
logger.error("bot create error", e);
resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_FAIL_5);
resp.addProperty(RestUtils.RESP_KEY_ERROR, "Chatopera开发者平台提示无法访问该机器人请确认【1】该服务器可以访问互联网【2】该聊天机器人已经创建【3】clientId和Secret正确设置。");
return resp;
} catch (MalformedURLException e) {
logger.error("bot request error", e);
resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_FAIL_7);
resp.addProperty(RestUtils.RESP_KEY_ERROR, "更新智能问答引擎失败。" + e.toString());
return resp;

View File

@ -481,7 +481,7 @@
<#if sessionConfig?? && sessionConfig.satisfaction?? && sessionConfig.satisfaction>
document.getElementById("diaShade").style.display = "block" ;
document.getElementById("dialogWrap").style.display = "block" ;
document.getElementById("dialogWrap").style.display = "block";
</#if>
}
if(document.getElementById("agentserviceid")){
@ -491,7 +491,7 @@
socket.on('message', function(data) {
var chat=document.getElementsByClassName('chatting-left').innerText;
chat = data.message;
// console.log("On Server Message from Chatbot: ", chat, ", 动态参数:", data.expmsg);
console.log("On Server Message from Chatbot: ", chat, ", 动态参数 data.expmsg", data.expmsg);
if(data.messageType == "image"){
chat = "<a href='"+data.message+"&original=true' target='_blank'><img src='"+data.message+"' class='ukefu-media-image'/></a>" ;