1.add try catch for some method in apiinstance
2.change some thing in constant

Signed-off-by: scauwjh <scauwjh@gmail.com>