dvjsharma / Drawn2Shoe

Drawn2Shoe is a user-friendly e-commerce platform. It offers customers the ability to purchase and personalize their shoes. The platform's intuitive interface ensures seamless navigation and usability across a variety of devices.
MIT License
26 stars 44 forks source link

Server Crash due to undefined value is sent to addCart api #84

Closed Sujal7ss closed 3 months ago

Sujal7ss commented 4 months ago

Describe the bug There is a bug in shop section - If user adds a product without selecting the shoe size, but the cart api is expecting the shoe size and attempts to add size (undefined) . It crashes the server.

Steps To Reproduce Steps to reproduce the behavior:

  1. Log in to the website
  2. Select any product
  3. Add to cart without selecting the shoe size
  4. See error

Expected behavior A error message must be shown to user to select a shoe size

Screenshot 2024-06-01 170050
Sujal7ss commented 3 months ago

@dvjsharma Please assign me this issue. Suggest any changes if required..

dvjsharma commented 3 months ago

Approach looks good. We are already using react-hot-toast library for notifications. Please see if you can implement a validation throws a prompt when no size is selected.

Sujal7ss commented 3 months ago

Okay I will use it It's an enhancement to previous feature, can you add level 2

dvjsharma commented 3 months ago

It’s a basic check. Level 1 seems good. //cc @ShashankShekhar07

Sujal7ss commented 3 months ago

Approach looks good. We are already using react-hot-toast library for notifications. Please see if you can implement a validation throws a prompt when no size is selected.

It was added Screenshot 2024-06-08 015705

dvjsharma commented 3 months ago

PR was WIP when I saw it. Please rename as tests are failing

Sujal7ss commented 3 months ago

How should I rename it, what is causing the title checker failed issue