Refactor create_endpoint for better error handling
Refactor create_endpoint for better error handling


Former-commit-id: 5aa485a34758d458cd2040098b8731f6aa3fa644
Symmetric/libcalico,projectcalico/libnetwork-plugin,TrimBiggs/libnetwork-plugin,djosborne/libcalico,insequent/libcalico,robbrockbank/libcalico,tomdee/libcalico,tomdee/libnetwork-plugin,plwhite/libcalico,TrimBiggs/libnetwork-plugin,projectcalico/libcalico,alexhersh/libcalico,TrimBiggs/libcalico,caseydavenport/libcalico,L-MA/libcalico