Skip to content

Prompt list service can hang on LangChain Hub because axios.get has no timeout #6514

Description

@luochen211

Describe the bug

packages/server/src/services/prompts-lists/index.ts fetches popular prompts from LangChain Hub without an explicit timeout:

const resp = await axios.get(url)

The error path returns { status: 'ERROR', repos: [] }, but a slow or blackholed api.hub.langchain.com request can keep the server route waiting until Axios/network defaults resolve.

To Reproduce

  1. Run Flowise in an environment where https://api.hub.langchain.com is slow, blocked, or blackholed.
  2. Trigger the prompt-list service.
  3. The request waits on the external call instead of failing within a bounded time and returning the existing empty-list fallback.

Expected behavior

The prompts-list service should use a bounded timeout and return { status: 'ERROR', repos: [] } quickly when LangChain Hub is unavailable.

Flow

Not applicable; this is a server-side prompt list retrieval path.

Use Method

Docker / npx flowise start / pnpm start

Flowise Version

Current main branch by code inspection.

Operating System

Linux / macOS / Windows

Browser

Not browser-specific.

Additional context

A possible fix is to pass timeout to axios.get and optionally make it configurable for self-hosted deployments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions