vishal-gh / TodoApp

0 stars 1 forks source link

Possible 404 #16

Open cpiazza opened 3 years ago

cpiazza commented 3 years ago

This will generate a 404 if the ID is invalid. How could you handle this more gracefully?

https://github.com/vishal-gh/TodoApp/blob/da395eb5f57e2bf966c7fe618bc7f8f2a99a62ec/app/controllers/todo_lists_controller.rb#L69

vishal-gh commented 3 years ago

We have added an error message saying "Record does not exist". We are using "rescue" as it generates "NoRecordFound" exception when the ID is invalid.