langgenius/dify · warning · NotFound

Conversation Not Exists.

Error message

Conversation Not Exists.

What it means

NotFound (HTTP 404, werkzeug) with message 'Conversation Not Exists.' is raised in ConversationApi.delete when ConversationService.delete throws ConversationNotExistsError. The conversation UUID in the path does not match any conversation for this app and user — it was already deleted, never existed, or belongs to a different user/app.

Source

Thrown at api/controllers/console/explore/conversation.py:123

    "/installed-apps/<uuid:installed_app_id>/conversations/<uuid:c_id>",
    endpoint="installed_app_conversation",
)
class ConversationApi(InstalledAppResource):
    @console_ns.response(204, "Conversation deleted successfully")
    @with_current_user
    def delete(self, current_user: Account, installed_app: InstalledApp, c_id: UUID):
        app_model = installed_app.app_with_session(session=db.session())
        if app_model is None:
            raise AppUnavailableError()
        app_mode = AppMode.value_of(app_model.mode)
        if app_mode not in {AppMode.CHAT, AppMode.AGENT_CHAT, AppMode.ADVANCED_CHAT}:
            raise NotChatAppError()

        conversation_id = str(c_id)
        try:
            ConversationService.delete(app_model, conversation_id, current_user, session=db.session())
        except ConversationNotExistsError:
            raise NotFound("Conversation Not Exists.")

        return "", 204


@console_ns.route(
    "/installed-apps/<uuid:installed_app_id>/conversations/<uuid:c_id>/name",
    endpoint="installed_app_conversation_rename",
)
class ConversationRenameApi(InstalledAppResource):
    @console_ns.expect(console_ns.models[ConversationRenamePayload.__name__])
    @console_ns.response(200, "Conversation renamed successfully", console_ns.models[SimpleConversation.__name__])
    @with_current_user
    @model_validate(ConversationRenamePayload)
    def post(self, req_data: ConversationRenamePayload, current_user: Account, installed_app: InstalledApp, c_id: UUID):
        app_model = installed_app.app_with_session(session=db.session())
        if app_model is None:
            raise AppUnavailableError()
        app_mode = AppMode.value_of(app_model.mode)

View on GitHub (pinned to ef8544b173)

Solutions

  1. Treat a 404 on delete as success (idempotent delete) — the conversation is already gone.
  2. If the user expects the conversation to exist, check the conversation list to confirm it was not already deleted.
  3. Ensure the c_id comes from the current user's own conversation list, not a shared or copied URL.

Example fix

// before: treat 404 as an error
await deleteConversation(id);  // throws on 404
// after: idempotent delete
try { await deleteConversation(id); }
catch (e) { if (e.status === 404) return; /* already deleted */ throw e; }
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await deleteConversation(installedAppId, conversationId);
} catch (e) {
  if (e.status === 404 && e.message?.includes('Conversation Not Exists')) {
    // already deleted — treat as success (idempotent)
    return;
  }
  throw e;
}

Prevention

When it happens

Trigger: DELETE /console/explore/installed-apps/<id>/conversations/<c_id> where c_id is a valid UUID but no conversation record exists for that app_model + current_user combination. Commonly a double-delete or a stale conversation reference.

Common situations: The conversation was already deleted in another tab/session; the UUID was fabricated or mistyped (but still valid UUID format); the conversation belongs to a different user; a retention policy already cleaned it up.

Related errors


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