Skip to content

GET /api/v1/settings/attributes/{id} – Internal Server Error when fetching invalid or non-existent ID #120

Open
@sagarkumar-webkul

Description

@sagarkumar-webkul

API Issue Report


Title

GET /api/v1/settings/attributes/{id} – Internal Server Error when fetching invalid or non-existent ID


Description

When making a GET request to the /api/v1/settings/attributes/{id} endpoint with an invalid or non-existent ID, the API returns a 500 Internal Server Error.

This is not expected behavior. The API should handle such cases gracefully and return a 404 Not Found with a proper error message.


Expected Behavior

  • Return 404 Not Found
  • Include a descriptive error message like: "Attribute not found" or "Invalid attribute ID"

Actual Behavior

  • Returns 500 Internal Server Error
  • No user-friendly error message

Steps to Reproduce

  1. Send a GET request to /api/v1/settings/attributes/{id} using a non-existent ID (e.g., /api/v1/settings/attributes/999999)
  2. Observe the server response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions