It doesn't look like you are doing much input validation in the server or returning appropriate response codes in case of errors.
Having the util functions to handle error cases is really good but I think they'll always return a 200 OK so it's difficult for your client/browsers to handle failed requests properly.
It doesn't look like you are doing much input validation in the server or returning appropriate response codes in case of errors.
Having the util functions to handle error cases is really good but I think they'll always return a
200 OK
so it's difficult for your client/browsers to handle failed requests properly.