langgenius/dify · warning · AppSuggestedQuestionsAfterAnswerDisabledError

app_suggested_questions_after_answer_disabled

app_suggested_questions_after_answer_disabled

Error message

Function Suggested questions after answer disabled.

What it means

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.

Source

Thrown at api/controllers/console/explore/trial.py:643

        if app_mode not in {AppMode.CHAT, AppMode.AGENT_CHAT, AppMode.ADVANCED_CHAT}:
            raise NotChatAppError()

        message_id = str(message_id)

        try:
            questions = MessageService.get_suggested_questions_after_answer(
                app_model=app_model,
                user=current_user,
                message_id=message_id,
                invoke_from=InvokeFrom.EXPLORE,
                session=db.session(),
            )
        except MessageNotExistsError:
            raise NotFound("Message not found")
        except ConversationNotExistsError:
            raise NotFound("Conversation not found")
        except SuggestedQuestionsAfterAnswerDisabledError:
            raise AppSuggestedQuestionsAfterAnswerDisabledError()
        except ProviderTokenNotInitError as ex:
            raise ProviderNotInitializeError(ex.description)
        except QuotaExceededError:
            raise ProviderQuotaExceededError()
        except ModelCurrentlyNotSupportError:
            raise ProviderModelCurrentlyNotSupportError()
        except InvokeError as e:
            raise CompletionRequestError(e.description)
        except Exception:
            logger.exception("internal server error.")
            raise InternalServerError()

        return {"data": questions}


class TrialChatAudioApi(TrialAppResource):
    @console_ns.response(200, "Success", console_ns.models[AudioTranscriptResponse.__name__])
    @with_current_user

View on GitHub (pinned to ef8544b173)

Solutions

  1. Enable the feature in the app studio: App Settings -> the suggested-questions-after-answer toggle, then publish.
  2. If you do not own the app, hide the UI control when the feature is disabled (the app detail API exposes the config).
  3. Do not retry - this is deterministic until config changes.

Example fix

// before - always show the button
<button onClick={fetchSuggested} />

// after - hide when disabled
{app.suggested_questions_after_answer?.enabled && <button onClick={fetchSuggested} />}
Defensive patterns

Strategy: validation

Validate before calling

const app = await fetch(`/console/api/explore/apps/${appId}`).then(r => r.json())
if (!app.suggested_questions_after_answer?.enabled) {
  // do not call the endpoint
}

Type guard

function isSuggestedQuestionsEnabled(app: any): boolean {
  return Boolean(app?.suggested_questions_after_answer?.enabled)
}

Try / catch

try {
  const r = await fetch(suggestedUrl)
  if (r.status === 403) {
    const body = await r.json()
    if (body.code === 'app_suggested_questions_after_answer_disabled') hideControl()
  }
} catch (e) { reportToUser(e) }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12). Data as JSON: /api/errors/ea208136408cedc1. Report an issue: GitHub.