Skip to content

fix(http): redact internal exceptions in HTTP error responses #398

Open

Description

@WH-2099

Serverless and Endpoint error responses expose internal exception text.
An injected error containing /private/example reaches the HTTP body on main at a91e6b4a.
Endpoint also treats a plugin's internal ValueError as a routing failure and returns 404.

Required behavior:

  • Return Internal Server Error for SDK-generated 500 responses and log the original exception with its traceback.
  • Limit Endpoint's 404 handling to route dispatch; plugin construction and invocation failures, including ValueError, return 500.
  • Use a generic Not Found body for route failures and preserve explicitly returned plugin responses.
  • In the daemon, redact the shared internal-error response and interrupt failed Endpoint streams without appending exception text, including across nodes.
  • Test that injected internal details appear in logs but not in HTTP responses, and document the error-body, status, and stream-failure changes.

Daemon implementation: langgenius/dify-plugin-daemon#834.
Implementation PRs: #402 and langgenius/dify-plugin-daemon#835.
Keep this issue open until both implementations and their joint acceptance checks are complete.

Follow-up to #394 and #396.

Delivery status — 2026-11-02

Target product release: Dify 1.19.0.
Keep this issue open until the remaining acceptance is recorded; merged component PRs do not establish deployment acceptance.
Daemon items retain their current milestone assignments.

Activity

  1. self-assigned this
    on Oct 13, 2026
  2. changed the title [-]fix(serverless): redact internal exceptions in HTTP error responses[/-] [+]fix(http): redact internal exceptions in HTTP error responses[/+] on Oct 14, 2026
  3. added this to the 1.19.0 milestone on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions