Describe the bug
When sending an incorrect or invalid payload to the API, the response body correctly displays an error message such as:
"Internal server error"
However, the HTTP status code is still 200, which is incorrect.
The API should return a proper error status code (e.g., 400, 422, or 500) depending on the validation or server failure.
To Reproduce
Steps to reproduce the behavior:
- Pass an invalid/wrong payload (selectedConfigurableOption: 15, which is not available).
- Observe the response.
Expected behavior
API should return correct error status codes, such as:
- 400 → Bad Request
- 422 → Unprocessable Entity
- 500 → Internal Server Error (if it fails internally)
The status code should match the error displayed in the response body.
Actual Result:
Response body shows "Internal server error".
Status code remains 200, which indicates success even though the request failed.
Screenshots
If applicable, add screenshots to help explain your problem.
