chore: (trigger) add WEBHOOK_REQUEST_BODY_MAX_SIZE (#25217)

This commit is contained in:
非法操作
2025-09-05 12:23:11 +08:00
committed by GitHub
parent 88af8ed374
commit 68f73410fc
7 changed files with 35 additions and 1 deletions

View File

@ -1,7 +1,7 @@
import logging
from flask import jsonify
from werkzeug.exceptions import NotFound
from werkzeug.exceptions import NotFound, RequestEntityTooLarge
from controllers.trigger import bp
from services.webhook_service import WebhookService
@ -39,6 +39,8 @@ def handle_webhook(webhook_id: str):
except ValueError as e:
raise NotFound(str(e))
except RequestEntityTooLarge:
raise
except Exception as e:
logger.exception("Webhook processing failed for %s", webhook_id)
return jsonify({"error": "Internal server error", "message": str(e)}), 500