Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: buffer not return event show errors (#149)

Joel2d0d3365ed55
diff --git a/web/service/base.ts b/web/service/base.ts
index e783c247f96..c6e841e5ac8 100644
--- a/web/service/base.ts
+++ b/web/service/base.ts
@@ -78,7 +78,7 @@ const handleStream = (response: any, onData: IOnData, onCompleted?: IOnCompleted
if (message.startsWith('data: ')) { // check if it starts with data:
// console.log(message);
bufferObj = JSON.parse(message.substring(6)) // remove data: and parse as json
- if (bufferObj.status === 400) {
+ if (bufferObj.status === 400 || !bufferObj.event) {
onData('', false, {
conversationId: undefined,
messageId: '',