Skip to content

[Bug]: Search page displays raw HTTP error strings inline in form fields on backend failure #4464

Description

@shubhtrek

What happened?

When the Jaeger backend is unavailable or returns an error, the Search page
displays raw HTTP error messages directly inside the form fields:

  • Below the "Service" dropdown: "Error loading services: Failed to fetch services: 502 Bad Gateway"
  • Below the "Span Name" dropdown: "Error loading operations: Failed to fetch span names for service "frontend": 502 Bad Gateway"

These errors appear immediately on page load before the user interacts with anything.
The messages are raw internal HTTP error strings exposed directly to the user, with
no icon, no container, and no margin separating them from the next form label below.

Additionally, the second error ("Failed to fetch span names for service frontend")
fires on load even though the user never selected the "frontend" service — implying
the app auto-queries span names for a cached/default service without user intent.

Steps to reproduce

  1. Start Jaeger UI (pnpm start) without a running Jaeger backend
  2. Navigate to http://localhost:5173/search
  3. Observe the Search form on the left panel
  4. Notice the red error text appearing below the "Service" and "Span Name" dropdowns immediately on load
  5. Switch to Light mode (click the theme toggle in the top right) to see the errors more clearly

Expected behavior

When the backend is unavailable:

  • The Service and Span Name dropdowns should show a subtle, user-friendly indicator
    (e.g., a warning icon or greyed-out placeholder like "Backend unavailable")
  • The raw HTTP error string should NOT be shown to the user
  • The service count should show "Service (–)" or no count, rather than "Service (0)"
    which incorrectly implies zero services exist
  • No auto-query for span names should fire before the user selects a service

Relevant log output

Failed to fetch services: 502 Bad Gateway
Failed to fetch span names for service "frontend": 502 Bad Gateway

Screenshot

Image

Additional context

The issue exists in both dark and light themes. In light mode, the bright red error
text on a white background is especially jarring and makes the UI appear broken even
to users who understand the backend may not be connected.

Jaeger backend version

No response

SDK

No response

Pipeline

No response

Stogage backend

No response

Operating system

No response

Deployment model

No response

Deployment configs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions