[PR #611] [MERGED] fix: write correct error structure #611

Closed
opened 2026-02-16 01:16:32 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/611
Author: @fatelei
Created: 2/13/2026
Status: Merged
Merged: 2/13/2026
Merged by: @fatelei

Base: mainHead: issue-609


📝 Commits (1)

  • d63aa5d fix: write correct error structure

📊 Changes

3 files changed (+115 additions, -3 deletions)

View changed files

📝 go.mod (+1 -1)
📝 internal/core/io_tunnel/backwards_invocation/transaction/serverless_handler.go (+21 -2)
internal/core/io_tunnel/backwards_invocation/transaction/serverless_handler_test.go (+93 -0)

📄 Description

Description

fix #609

dify plugin sdk

 class BackwardsInvocationResponseEvent(BaseModel):
      class Event(Enum):
          response = "response"
          Error = "error"
          End = "end"

      backwards_request_id: str
      event: Event
      message: str
      data: dict | None

need this structure, but origin return ctx.Writer.Write([]byte(err.Error())) this is normal string not match the python structure.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Bug Fix (if applicable)

  • I have used GitHub syntax to close the related issue (e.g., Fixes #123 or Closes #123)

Additional Information

Please provide any additional context that would help reviewers understand the changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/611 **Author:** [@fatelei](https://github.com/fatelei) **Created:** 2/13/2026 **Status:** ✅ Merged **Merged:** 2/13/2026 **Merged by:** [@fatelei](https://github.com/fatelei) **Base:** `main` ← **Head:** `issue-609` --- ### 📝 Commits (1) - [`d63aa5d`](https://github.com/langgenius/dify-plugin-daemon/commit/d63aa5df6bf59e6b3a9d9d456b84a9db67ab0d9a) fix: write correct error structure ### 📊 Changes **3 files changed** (+115 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+1 -1) 📝 `internal/core/io_tunnel/backwards_invocation/transaction/serverless_handler.go` (+21 -2) ➕ `internal/core/io_tunnel/backwards_invocation/transaction/serverless_handler_test.go` (+93 -0) </details> ### 📄 Description ## Description fix #609 dify plugin sdk ``` class BackwardsInvocationResponseEvent(BaseModel): class Event(Enum): response = "response" Error = "error" End = "end" backwards_request_id: str event: Event message: str data: dict | None ``` need this structure, but origin return `ctx.Writer.Write([]byte(err.Error()))` this is normal string not match the python structure. ## Type of Change - [x] Bug fix - [ ] New feature - [ ] Refactor - [ ] Performance improvement - [ ] Other ## Essential Checklist ### Testing - [x] I have tested the changes locally and confirmed they work as expected - [ ] I have added unit tests where necessary and they pass successfully ### Bug Fix (if applicable) - [ ] I have used GitHub syntax to close the related issue (e.g., `Fixes #123` or `Closes #123`) ## Additional Information Please provide any additional context that would help reviewers understand the changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:32 -05:00
yindo closed this issue 2026-02-16 01:16:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#611