nyu-devops-squad/shopcarts

Data Validation Error

Closed this issue · 0 comments

Describe the problem
Our current implementation has problem validating the input data. Invalid data will cause the APP to throw 5xx error.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the index page
  2. Enter data: {customer_id: 1, product_id: 1, product_name: a, product_price: a, quantity: a}
  3. Click "Create"
  4. See error: "Internal Server Error"

Expected behavior
Return 4xx error like "400: Bad Request".

Observed behavior
Return "Internal Server Error", indicating a 5xx error.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [e.g. macOS, Windows, iOS, Android]
  • Browser [e.g. safari , chrome, firefox]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.