mirror of
https://github.com/langgenius/dify.git
synced 2026-05-24 10:57:52 +08:00
- Drop except ValueError: raise. Inherited from per-mode controllers without examining purpose; today it converts helper-internal ValueErrors into uncaptured 500s with no body or log. Falling through to except Exception: gives them a logged trace and a structured InternalServerError. - Drop redundant AppMode.value_of(app_model.mode). App.mode is Mapped[AppMode] with an EnumText adapter that returns the enum directly; value_of was a no-op iteration. - Comment the explicit re-raise block to spell out why ordering matters before the catch-all.