From 8b208b2e10d217e3b035800c51ce55feb7c330aa Mon Sep 17 00:00:00 2001 From: GareArc Date: Mon, 9 Jun 2025 20:32:50 +0900 Subject: [PATCH] fix: add detailed error info when app model is not configured --- api/controllers/web/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/controllers/web/app.py b/api/controllers/web/app.py index 0bed3897a7..d0702dc8af 100644 --- a/api/controllers/web/app.py +++ b/api/controllers/web/app.py @@ -23,14 +23,16 @@ class AppParameterApi(WebApiResource): if app_model.mode in {AppMode.ADVANCED_CHAT.value, AppMode.WORKFLOW.value}: workflow = app_model.workflow if workflow is None: - raise AppUnavailableError() + raise AppUnavailableError( + "Workflow is not available for this app. Please publish your app with the correct workflow." + ) features_dict = workflow.features_dict user_input_form = workflow.user_input_form(to_old_structure=True) else: app_model_config = app_model.app_model_config if app_model_config is None: - raise AppUnavailableError() + raise AppUnavailableError("App model configuration is not available. Please publish your app with the correct model setting.") features_dict = app_model_config.to_dict()