codersforcauses / csf

A PWA which will enable participants to track their kilometers while engaging in a walking/running/wheeling challenge.
https://stride-for-education.vercel.app
MIT License
11 stars 3 forks source link

user now knows error #272

Closed makon1234 closed 1 year ago

makon1234 commented 1 year ago

Change Summary

Team name already taken error more descriptive

Change Form

Fill this up (NA if not available). If a certain criteria is not met, can you please give a reason.

Other Information

[Is there anything in particular in the review that I should be aware of?]

Related Issue

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stride-for-education ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2023 7:37am
HuxleyBerry commented 1 year ago

You'll also get an error if you try to submit a very long team name (over 254 characters). It doesn't make sense for the error to say that the team name is already taken in this case. I think you'll need to show different error messages depending on the value of error.reponse.data. Also, you could keep the original generic error message, and make it show when none of the particular errors occur. That way, the user will still see that an error occurred if some weird error occurs (e.g. an internal server error).

makon1234 commented 1 year ago

Do you think I should try and create a limit of the number of characters the team name can have

makon1234 commented 1 year ago

also, is it okay if I ignore the yarn type-check errors?

HuxleyBerry commented 1 year ago

Nice, though you can replace error.response !== undefined with simply error.response, since undefined is falsy

HuxleyBerry commented 1 year ago

Looks good to me

makon1234 commented 1 year ago

Thanks, I will wait for Chantelle to give the all clear