staadecker / utoc-membership-system

The University of Toronto Outing Club membership system
MIT License
3 stars 0 forks source link

Calling API with empty string throws error #83

Closed staadecker closed 2 years ago

staadecker commented 3 years ago

The following bit of code will throw an error if data contains a parameter that is equal to an empty string, "". This is because, sheet.addRow doesn't return the cells that are empty. This is not a big issue, it just means when manually adding values to the database via the API, I either need to not specify a field or specify it with a value.

https://github.com/staadecker/utoc-membership-system/blob/85b2b9f8aa227e53133fde16ee58d08105b3afc0/components/membership-form-backend/index.js#L277-L286

staadecker commented 3 years ago

I should also update the error message while I'm at it for better understanding.