DEV Community

Discussion on: How to make e commerce website with HTML, CSS and JS part 2

Collapse
 
mcwolfmm profile image
mcwolfmm

and a little more criticism :) nowhere do you handle callback errors. this is a very bad practice.
be sure to check for an error first and only then continue processing the task. also, you can add another class of messages (besides alert) for example error to return in case of error

Collapse
 
themodernweb profile image
Modern Web

Thanks to pointing out the mistakes I'll make sure to handle error first.☺️

Some comments have been hidden by the post's author - find out more