mirror of
https://github.com/langgenius/dify.git
synced 2026-05-20 16:57:01 +08:00
Explicit re-raise list at L230-238 only covered UnprocessableEntity + NotChatAppError/NotWorkflowAppError. Other HTTPException subclasses raised inside handlers (NotFound, BadRequest, ConversationCompletedError, ProviderNotInitializeError, ProviderQuotaExceededError, ...) hit `except Exception` and got squashed to 500. Replace with `except HTTPException: raise`. Refactor bundled: collapse 3x try/except ladder into _translate_service_errors() ctxmgr, inline single-call constraint enforcers, drop wasted dict() copy in _unpack_blocking, trim module docstring and stale spec doc reference. -60 net lines.