Open cpiazza opened 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
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.
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