Added error handling. Should at least return a 404 response if an error occurs