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(trigger): stop leaking internal exception text from webhook 500 responses (#44395)

Juhyuk choi50454ab9bd31
diff --git a/api/controllers/trigger/webhook.py b/api/controllers/trigger/webhook.py
index 4df3d1ac9d0..b9734cb9f39 100644
--- a/api/controllers/trigger/webhook.py
+++ b/api/controllers/trigger/webhook.py
@@ -94,9 +94,9 @@ def handle_webhook(webhook_id: str):
return webhook_not_found_response()
except RequestEntityTooLarge:
raise
- except Exception as e:
+ except Exception:
logger.exception("Webhook processing failed for %s", webhook_id)
- return jsonify({"error": "Internal server error", "message": str(e)}), 500
+ return jsonify({"error": "Internal server error", "message": "An internal error has occurred."}), 500
@bp.route("/webhook-debug/<string:webhook_id>", methods=["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"])