You might try to use when ClouDB.cloudDBError block to cathc the error
also below post might help you