Skip to content

GET /api/v1/settings/sources/{id} – Internal Server Error when invalid or non-existent ID is provided #111

Open
@sagarkumar-webkul

Description

@sagarkumar-webkul

API Issue Report


Title

GET /api/v1/settings/sources/{id} – Internal Server Error when invalid or non-existent ID is provided


Description

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

Instead, the API should handle this case gracefully by returning a 404 Not Found response with a clear and user-friendly error message.


Steps to Reproduce

  1. Send a GET request to /api/v1/settings/sources/99999 (assuming ID 99999 does not exist).
  2. Observe the response: the server returns a 500 Internal Server Error.

Expected Behavior

The API should return a 404 Not Found response with a descriptive message like:
"Source with ID 99999 not found."


Actual Behavior

Image

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