Fix error json for chat (#22)
This commit is contained in:
1 parent
42bfe4dff5
commit
bf78493b46
2 files changed
+9
-2
No files matched your search
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "patch",
|
||||
"comment": "fix error json parse for chat",
|
||||
"packageName": "@acedatacloud/hub",
|
||||
"email": "cqc@cuiqingcai.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
||||
@@ -258,12 +258,12 @@ export default defineComponent({
|
||||
code: ERROR_CODE_CANCELED
|
||||
};
|
||||
} else if (error?.response?.data) {
|
||||
let data = error?.response?.data?.error;
|
||||
let data = error?.response?.data;
|
||||
if (isJSONString(data)) {
|
||||
data = JSON.parse(data);
|
||||
}
|
||||
if (this.messages && this.messages.length > 0) {
|
||||
this.messages[this.messages.length - 1].error = data;
|
||||
this.messages[this.messages.length - 1].error = data.error;
|
||||
}
|
||||
} else {
|
||||
if (this.messages && this.messages.length > 0) {
|
||||
|
||||
Reference in new issue
Block a user