generated from RealDevSquad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 279
Closed
Description
Issue Description
The backend API https://api.realdevsquad.com/taskRequests/:id returning a 200 OK status code along with the message "Task request returned successfully" even when the requested task ID does not exist. This is misleading because it suggests the request was successful, while the task is not actually found.
Expected Behavior
- The API should return a 404 Not Found status code.
- The response body should provide a clear error message, such as:
{
"error": "Task not found"
}
The message "Task request returned successfully" should only be returned when a valid task is found.
Current Behavior
- The API returns a 200 OK status code, regardless of whether the task ID exists or not.
- The response body always includes:
{
"message": "Task request returned successfully"
}
Screenshots
Reproducibility
- This issue is reproducible
- This issue is not reproducible
Steps to Reproduce
- Try sending a get request to this endpoint
https://api.realdevsquad.com/taskRequests/:idwith a task ID that does not exist - Observe that the response returns a
200 OKstatus code with the message"Task request returned successfully".
Severity/Priority
- Critical
- High
- Medium
- Low
Additional Information
Checklist
- I have read and followed the project's code of conduct.
- I have searched for similar issues before creating this one.
- I have provided all the necessary information to understand and reproduce the issue.
- I am willing to contribute to the resolution of this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels