improve error handling for frontend route creation