cpsc455-bugstorm / TravelersTea

A Trip Planning App that tailors travel itineraries based on user preferences and providing detailed information about destinations; making travel planning less daunting and more enjoyable.
https://travelerstea-906d.onrender.com
MIT License
6 stars 2 forks source link

Make generateTrip directly throw errors instead of returning them as a string #178

Closed Graywing13 closed 10 months ago

Graywing13 commented 10 months ago

in generateTrip.js, chatgpt or other constraints may return an error string.

It's better to directly throw errors because it is more direct if we throw the error instead of having the downstream parse the string as an error.