Skip to content

[Bug]: Frontend service returns 500 for invalid customer ID instead of 400 #7979

@aaryan359

Description

@aaryan359

What happened?

As a Jaeger contributor / developer running the HotROD example,
I want the frontend service to differentiate between user input errors and internal server errors,
so that clients receive correct HTTP status codes and error messages.

Currently, in the HotROD frontend service, errors returned from bestETA.Get() are always treated as internal server failures. This causes cases like an invalid customer ID (a user-side error) to incorrectly return HTTP 500 Internal Server Error instead of a 400 Bad Request.

There is already a TODO comment in the code acknowledging this issue, but the behavior has not yet been implemented.

Steps to reproduce

  1. Run the HotROD example application.
  2. Send a request to the frontend service with an invalid customer ID.
  3. Observe the HTTP response status code.

Expected behavior

  • User-related errors (e.g., invalid customer ID) should return HTTP 400 Bad Request.
  • Internal failures should return HTTP 500 Internal Server Error.
  • The frontend service should distinguish between these error types based on the error returned by bestETA.Get().

Relevant log output

N/A (no specific logs required to reproduce this issue)

Screenshot

Image

Additional context

  • File: examples/hotrod/services/frontend/server.go
  • Lines: ~113–115
  • TODO comment:
    // TODO distinguish between user errors (such as invalid customer ID) and server failures

Jaeger backend version

No response

SDK

No response

Pipeline

No response

Stogage backend

No response

Operating system

ubuntu

Deployment model

No response

Deployment configs

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