improve error checking after calling endpoint
improve error checking after calling endpoint

[#93382608]

Signed-off-by: Jonathan Berkhahn <8cee8fadf1c8e6e3ca6f5e7d5617d96aa76b918c@us.ibm.com>

kavoj/cli,markstgodard/cli,diatmpravin/cli,HuaweiTech/cli,cf-routing/cli,diatmpravin/cli,EngineerBetter/cli,HuaweiTech/cli,mcintyred/cli,carnell69/cli,Zouuup/cli,cgvarela/cli,diatmpravin/cli,TomG713/cli,kavoj/cli,18F/cli,mcowger/cli,evanfarrar/cli,hyenaspots/cli,hyenaspots/cli,SrinivasChilveri/cli,evanfarrar/cli,saurabhguptasg/cli,cf-routing/cli,cgvarela/cli,saravana76/cli,evanfarrar/cli,Zouuup/cli,pishro-cc/cli,saurabhguptasg/cli,hyenaspots/cli,saravana76/cli,ofer43211/cli,simonleung8/cli,pishro-cc/cli,TomG713/cli,markstgodard/cli,mcowger/cli,cf-routing/cli,cgvarela/cli,saurabhguptasg/cli,evanfarrar/cli,EngineerBetter/cli,saravana76/cli,simonleung8/cli,18F/cli,saravana76/cli,pishro-cc/cli,ofer43211/cli,carnell69/cli,mcowger/cli,markstgodard/cli,markstgodard/cli,HuaweiTech/cli,ofer43211/cli,ofer43211/cli,SrinivasChilveri/cli,ReachingOut/cli,mcintyred/cli,fujitsu-cf/cli,SrinivasChilveri/cli,TomG713/cli,ReachingOut/cli,HuaweiTech/cli,hyenaspots/cli,18F/cli,Zouuup/cli,diatmpravin/cli,fujitsu-cf/cli,carnell69/cli,mcintyred/cli,kavoj/cli,TomG713/cli,ReachingOut/cli,saurabhguptasg/cli,Zouuup/cli,18F/cli,fujitsu-cf/cli,EngineerBetter/cli,mcintyred/cli,EngineerBetter/cli,cf-routing/cli,ReachingOut/cli,mcowger/cli,simonleung8/cli,carnell69/cli,SrinivasChilveri/cli,kavoj/cli,pishro-cc/cli,cgvarela/cli