Search code examples
ibm-cloud-infrastructure

Is there any situation the REST service's http response code is 200, but the method returns false


most of the deleteObject methods will return a boolean value to indicate whether this operation succeed or not.

But from what I can see, if something wrong happened, http response code will not be 200, if http response code is 200, then the method returns true.

So I want to know in what situation http response code is not 200 and method return false, so that I can check this condition and display proper messages instead of just telling deletion failed.


Solution

  • These methods like deleteObject only return true or an exception when something is wrong or if it does not success. In other words, there is no any situation to return false