Add dynamic route and error handling