Proper error handling added for creating lagues.