Title:
Unfriendly Error Message on Fetching Non-Existent Marketing Campaign via GET /api/v1/settings/marketing/campaigns/{id}
Description:
When attempting to fetch a marketing campaign using a non-existent ID, the API returns a 404 response containing internal exception traces instead of a clean, user-friendly message.
Affected Endpoint:
GET /api/v1/settings/marketing/campaigns/{id}
Preconditions:
- The marketing campaign ID passed in the URL does not exist in the database.
Steps to Reproduce:
- Send a
GET request to /api/v1/settings/marketing/campaigns/45 (assuming ID 45 does not exist).
- Observe the API response.
Actual Result:
{
"message": "No query results for model [Webkul\\Marketing\\Models\\Campaign] 45",
"exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException",
...
}
Expected Result:
- A clean and clear 404 response like:
{
"message": "Marketing campaign with ID 45 not found.",
"status": 404
}
Title:
Unfriendly Error Message on Fetching Non-Existent Marketing Campaign via
GET /api/v1/settings/marketing/campaigns/{id}Description:
When attempting to fetch a marketing campaign using a non-existent ID, the API returns a 404 response containing internal exception traces instead of a clean, user-friendly message.
Affected Endpoint:
GET /api/v1/settings/marketing/campaigns/{id}Preconditions:
Steps to Reproduce:
GETrequest to/api/v1/settings/marketing/campaigns/45(assuming ID 45 does not exist).Actual Result:
{ "message": "No query results for model [Webkul\\Marketing\\Models\\Campaign] 45", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", ... }Expected Result:
{ "message": "Marketing campaign with ID 45 not found.", "status": 404 }