See also How to get the reason for a failure of a SDK function.