some error messages in APIs not in json
Closed this issue · 0 comments
aanchal22 commented
Describe the problem
REST API returns some HTML error messages that should be json.
To Reproduce
Steps to reproduce the behavior:
PUT /shopcarts/<int:customer_id>/<int:product_id>
- Make an erroneous request
- See error (not in JSON)
Expected behavior
The error message should be in JSON format.
Observed behavior
Error message not in JSON format.
Additional context
We need to include error_handlers.py in init.py and also check code coverage after testing our API error responses.