handle the error properly
handle the error properly

[#126256743, #131127157]

Signed-off-by: Nick Wei <397a225b6adb51a440bd3821475520403c3e9564@pivotal.io>

cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli