{"record":{"id":"ea208136408cedc1","repo":"langgenius/dify","slug":"app-suggested-questions-after-answer-disabled-ea2081","errorCode":"app_suggested_questions_after_answer_disabled","errorMessage":"Function Suggested questions after answer disabled.","messagePattern":"Function Suggested questions after answer disabled\\.","errorType":"error_code","errorClass":"AppSuggestedQuestionsAfterAnswerDisabledError","httpStatus":403,"severity":"warning","filePath":"api/controllers/console/explore/trial.py","lineNumber":643,"sourceCode":"        if app_mode not in {AppMode.CHAT, AppMode.AGENT_CHAT, AppMode.ADVANCED_CHAT}:\n            raise NotChatAppError()\n\n        message_id = str(message_id)\n\n        try:\n            questions = MessageService.get_suggested_questions_after_answer(\n                app_model=app_model,\n                user=current_user,\n                message_id=message_id,\n                invoke_from=InvokeFrom.EXPLORE,\n                session=db.session(),\n            )\n        except MessageNotExistsError:\n            raise NotFound(\"Message not found\")\n        except ConversationNotExistsError:\n            raise NotFound(\"Conversation not found\")\n        except SuggestedQuestionsAfterAnswerDisabledError:\n            raise AppSuggestedQuestionsAfterAnswerDisabledError()\n        except ProviderTokenNotInitError as ex:\n            raise ProviderNotInitializeError(ex.description)\n        except QuotaExceededError:\n            raise ProviderQuotaExceededError()\n        except ModelCurrentlyNotSupportError:\n            raise ProviderModelCurrentlyNotSupportError()\n        except InvokeError as e:\n            raise CompletionRequestError(e.description)\n        except Exception:\n            logger.exception(\"internal server error.\")\n            raise InternalServerError()\n\n        return {\"data\": questions}\n\n\nclass TrialChatAudioApi(TrialAppResource):\n    @console_ns.response(200, \"Success\", console_ns.models[AudioTranscriptResponse.__name__])\n    @with_current_user","sourceCodeStart":625,"sourceCodeEnd":661,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/explore/trial.py#L625-L661","documentation":"HTTP 403 with error_code `app_suggested_questions_after_answer_disabled`, raised by AppSuggestedQuestionsAfterAnswerDisabledError when the service raises SuggestedQuestionsAfterAnswerDisabledError. The feature is turned off in the app's model config, so the controller refuses before invoking the LLM. This is a configuration gate, not a runtime fault.","triggerScenarios":"GET suggested-questions for an app whose `suggested_questions_after_answer.enabled` config flag is false (or absent). The owner disabled the feature in the studio, or the app template never enabled it.","commonSituations":"A user clicks 'suggest follow-up questions' on a trial app that never turned the feature on; the app was cloned from a template with the flag off; an admin toggled it off to save provider cost.","solutions":["Enable the feature in the app studio: App Settings -> the suggested-questions-after-answer toggle, then publish.","If you do not own the app, hide the UI control when the feature is disabled (the app detail API exposes the config).","Do not retry - this is deterministic until config changes."],"exampleFix":"// before - always show the button\n<button onClick={fetchSuggested} />\n\n// after - hide when disabled\n{app.suggested_questions_after_answer?.enabled && <button onClick={fetchSuggested} />}","handlingStrategy":"validation","validationCode":"const app = await fetch(`/console/api/explore/apps/${appId}`).then(r => r.json())\nif (!app.suggested_questions_after_answer?.enabled) {\n  // do not call the endpoint\n}","typeGuard":"function isSuggestedQuestionsEnabled(app: any): boolean {\n  return Boolean(app?.suggested_questions_after_answer?.enabled)\n}","tryCatchPattern":"try {\n  const r = await fetch(suggestedUrl)\n  if (r.status === 403) {\n    const body = await r.json()\n    if (body.code === 'app_suggested_questions_after_answer_disabled') hideControl()\n  }\n} catch (e) { reportToUser(e) }","preventionTips":["Drive UI visibility of the suggested-questions control from the app config.","Do not retry a 403 disabled-feature response; it is deterministic.","If you own the app, enable the feature in the studio and republish."],"tags":["dify","trial-api","console","explore","suggested-questions","feature-disabled","http-403","config"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}