commit 864320049b563f1a7bdd765d564664ca985e5ce0
Author: Christos KK Loverdos <loverdos@gmail.com>
Date:   Mon Feb 11 15:23:39 2013 +0200

    Fix regression with empty "Shared by me"

diff --git a/src/gr/grnet/pithos/web/client/Const.java b/src/gr/grnet/pithos/web/client/Const.java
index f87dd3c..710546a 100644
--- a/src/gr/grnet/pithos/web/client/Const.java
+++ b/src/gr/grnet/pithos/web/client/Const.java
@@ -23,6 +23,7 @@ public class Const {
     public static final String TRASH_CONTAINER = "trash";
     public static final RegExp EMAIL_REGEX = RegExp.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+[.][A-Z]{2,4}$", "i");
     public static final String X_ACCOUNT_GROUP_ = "X-Account-Group-";
+    public static final String NL = "\n";
 
     private Const() {}
 
diff --git a/src/gr/grnet/pithos/web/client/Pithos.java b/src/gr/grnet/pithos/web/client/Pithos.java
index a41f691..bb71e21 100644
--- a/src/gr/grnet/pithos/web/client/Pithos.java
+++ b/src/gr/grnet/pithos/web/client/Pithos.java
@@ -337,12 +337,14 @@ public class Pithos implements EntryPoint, ResizeHandler {
     }-*/;
 
     public static void LOG(Object ...args) {
-        final StringBuilder sb = new StringBuilder();
-        for(Object arg : args) {
-            sb.append(arg);
-        }
-        if(sb.length() > 0) {
-            __ConsoleLog(sb.toString());
+        if(false) {
+            final StringBuilder sb = new StringBuilder();
+            for(Object arg : args) {
+                sb.append(arg);
+            }
+            if(sb.length() > 0) {
+                __ConsoleLog(sb.toString());
+            }
         }
     }
 
@@ -500,6 +502,7 @@ public class Pithos implements EntryPoint, ResizeHandler {
         Scheduler.get().scheduleDeferred(new ScheduledCommand() {
             @Override
             public void execute() {
+                LOG("Pithos::initialize() Calling Pithos::fetchAccount()");
                 fetchAccount(new Command() {
 
                     @Override
@@ -723,9 +726,9 @@ public class Pithos implements EntryPoint, ResizeHandler {
                 final List<String> memberIDs = new ArrayList<String>();
                 final List<Group> groups = account.getGroups();
                 for(Group group : groups) {
-                    LOG("Group ", group);
+//                    LOG("Group ", group);
                     for(String member: group.getMemberIDs()) {
-                        LOG("      ", member);
+//                        LOG("      ", member);
                         memberIDs.add(member);
                     }
                 }
@@ -1182,6 +1185,7 @@ public class Pithos implements EntryPoint, ResizeHandler {
     }
 
     void createMySharedTree() {
+        LOG("Pithos::createMySharedTree()");
         mysharedTreeSelectionModel = new SingleSelectionModel<Folder>();
         mysharedTreeSelectionModel.addSelectionChangeHandler(new Handler() {
             @Override
@@ -1218,6 +1222,7 @@ public class Pithos implements EntryPoint, ResizeHandler {
     }
 
     void createOtherSharedTree() {
+        LOG("Pithos::createOtherSharedTree()");
         otherSharedTreeSelectionModel = new SingleSelectionModel<Folder>();
         otherSharedTreeSelectionModel.addSelectionChangeHandler(new Handler() {
             @Override
@@ -1240,8 +1245,8 @@ public class Pithos implements EntryPoint, ResizeHandler {
         });
         selectionModels.add(otherSharedTreeSelectionModel);
         otherSharedTreeViewModel = new OtherSharedTreeViewModel(Pithos.this, otherSharedTreeSelectionModel);
+        LOG("Pithos::createOtherSharedTree(), initializing otherSharedTreeViewModel with a callback");
         otherSharedTreeViewModel.initialize(new Command() {
-
             @Override
             public void execute() {
                 otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel);
@@ -1252,15 +1257,30 @@ public class Pithos implements EntryPoint, ResizeHandler {
         });
     }
 
-    public native void log1(String message)/*-{
-      $wnd.console.log(message);
-    }-*/;
-
     public String getErrorData() {
-        if(error != null) {
-            return error.toString();
+        final StringBuilder sb = new StringBuilder();
+        final String NL = Const.NL;
+        Throwable t = this.error;
+        while(t != null) {
+            sb.append(t.toString());
+            sb.append(NL);
+            StackTraceElement[] traces = t.getStackTrace();
+            for(StackTraceElement trace : traces) {
+                sb.append("  [");
+                sb.append(trace.getClassName());
+                sb.append("::");
+                sb.append(trace.getMethodName());
+                sb.append("() at ");
+                sb.append(trace.getFileName());
+                sb.append(":");
+                sb.append(trace.getLineNumber());
+                sb.append("]");
+                sb.append(NL);
+            }
+            t = t.getCause();
         }
-        return "";
+
+        return sb.toString();
     }
 
     public void setError(Throwable t) {
diff --git a/src/gr/grnet/pithos/web/client/catalog/UpdateUserCatalogs.java b/src/gr/grnet/pithos/web/client/catalog/UpdateUserCatalogs.java
index 5e46d61..2483545 100644
--- a/src/gr/grnet/pithos/web/client/catalog/UpdateUserCatalogs.java
+++ b/src/gr/grnet/pithos/web/client/catalog/UpdateUserCatalogs.java
@@ -33,7 +33,7 @@ public class UpdateUserCatalogs implements Scheduler.ScheduledCommand {
 
     public void onSuccess(UserCatalogs requestedUserCatalogs, UserCatalogs updatedUserCatalogs) {
         for(Map.Entry<String, String> uc : requestedUserCatalogs) {
-            app.LOG("New displayName ", uc.getValue());
+//            app.LOG("New displayName ", uc.getValue());
         }
     }
 
diff --git a/src/gr/grnet/pithos/web/client/foldertree/Folder.java b/src/gr/grnet/pithos/web/client/foldertree/Folder.java
index f2c5a6f..e5cbe02 100644
--- a/src/gr/grnet/pithos/web/client/foldertree/Folder.java
+++ b/src/gr/grnet/pithos/web/client/foldertree/Folder.java
@@ -322,4 +322,9 @@ public class Folder extends Resource {
 				return true;
 		return false;
 	}
+
+    @Override
+    public String toString() {
+        return "Folder(container="+container+", name="+name+", prefix="+prefix+")";
+    }
 }
diff --git a/src/gr/grnet/pithos/web/client/mysharedtree/MysharedTreeViewModel.java b/src/gr/grnet/pithos/web/client/mysharedtree/MysharedTreeViewModel.java
index 87aca52..0dfb8a1 100644
--- a/src/gr/grnet/pithos/web/client/mysharedtree/MysharedTreeViewModel.java
+++ b/src/gr/grnet/pithos/web/client/mysharedtree/MysharedTreeViewModel.java
@@ -35,6 +35,7 @@
 
 package gr.grnet.pithos.web.client.mysharedtree;
 
+import gr.grnet.pithos.web.client.Const;
 import gr.grnet.pithos.web.client.FolderContextMenu;
 import gr.grnet.pithos.web.client.Pithos;
 import gr.grnet.pithos.web.client.foldertree.AccountResource;
@@ -118,6 +119,7 @@ public class MysharedTreeViewModel implements TreeViewModel {
     }
 
 	private void fetchSharedContainers(final Command callback) {
+        app.LOG("MysharedTreeViewModel::fetchSharedContainers(), callback=", callback);
         String path = "?format=json&shared=&public=";
         GetRequest<AccountResource> getAccount = new GetRequest<AccountResource>(AccountResource.class, app.getApiPath(), app.getUserID(), path) {
             @Override
@@ -131,8 +133,10 @@ public class MysharedTreeViewModel implements TreeViewModel {
                 }
                 if (firstLevelDataProvider.getList().isEmpty())
                 	firstLevelDataProvider.getList().add(dummy);
-				if (callback != null)
-					callback.execute();
+				if (callback != null) {
+                    app.LOG("MysharedTreeViewModel::fetchSharedContainers(), executing callback");
+                    callback.execute();
+                }
             }
 
             @Override
@@ -150,7 +154,7 @@ public class MysharedTreeViewModel implements TreeViewModel {
 				app.sessionExpired();
 			}
         };
-        getAccount.setHeader("X-Auth-Token", app.getUserToken());
+        getAccount.setHeader(Const.X_AUTH_TOKEN, app.getUserToken());
         Scheduler.get().scheduleDeferred(getAccount);
 	}
 
@@ -160,12 +164,9 @@ public class MysharedTreeViewModel implements TreeViewModel {
 			return firstLevelDataProvider.getList().isEmpty();
 		return true;
     }
-	
-	private native void log(String msg) /*-{
-		$wnd.console.log(msg);
-	}-*/;
 
     protected void fetchFolder(final Iterator<Folder> iter, final Command callback) {
+        app.LOG("MysharedTreeViewModel::fetchFolder(), iter=", iter.hasNext(), ", callback=", callback);
         if (iter.hasNext()) {
             final Folder f = iter.next();
 
@@ -191,11 +192,12 @@ public class MysharedTreeViewModel implements TreeViewModel {
 					app.sessionExpired();
 				}
             };
-            getFolder.setHeader("X-Auth-Token", app.getUserToken());
+            getFolder.setHeader(Const.X_AUTH_TOKEN, app.getUserToken());
             Scheduler.get().scheduleDeferred(getFolder);
         }
-        else if (callback != null)
+        else if(callback != null) {
             callback.execute();
+        }
     }
 
     public Folder getSelection() {
@@ -207,6 +209,7 @@ public class MysharedTreeViewModel implements TreeViewModel {
     }
 
     public void fetchFolder(final Folder f, final boolean showfiles, final Command callback) {
+        app.LOG("MysharedTreeViewModel::fetchFolder(), folder=", f, ", showfiles=", showfiles, ", callback=", callback);
         String path = "/" + f.getContainer() + "?format=json&shared=&public=" + URL.encodeQueryString(f.getPrefix());
         GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwnerID(), path, f) {
             @Override
diff --git a/src/gr/grnet/pithos/web/client/othersharedtree/OtherSharedTreeViewModel.java b/src/gr/grnet/pithos/web/client/othersharedtree/OtherSharedTreeViewModel.java
index f66e75c..b1d4157 100644
--- a/src/gr/grnet/pithos/web/client/othersharedtree/OtherSharedTreeViewModel.java
+++ b/src/gr/grnet/pithos/web/client/othersharedtree/OtherSharedTreeViewModel.java
@@ -53,6 +53,7 @@ import com.google.gwt.user.client.ui.AbstractImagePrototype;
 import com.google.gwt.view.client.ListDataProvider;
 import com.google.gwt.view.client.SingleSelectionModel;
 import com.google.gwt.view.client.TreeViewModel;
+import gr.grnet.pithos.web.client.Const;
 import gr.grnet.pithos.web.client.FolderContextMenu;
 import gr.grnet.pithos.web.client.Pithos;
 import gr.grnet.pithos.web.client.SharingUsers;
@@ -79,6 +80,7 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
 
         @Override
         public void render(Context context, Folder folder, SafeHtmlBuilder safeHtmlBuilder) {
+//            app.LOG("OtherSharedTreeViewModel::render(), folder=", folder);
             String html = AbstractImagePrototype.create(OtherSharedTreeView.images.folderYellow()).getHTML();
             safeHtmlBuilder.appendHtmlConstant(html).appendHtmlConstant("&nbsp;");
             safeHtmlBuilder.append(Templates.INSTANCE.nameSpan(folder.getName()));
@@ -86,6 +88,7 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
 
         @Override
         public void onBrowserEvent(Context context, com.google.gwt.dom.client.Element parent, final Folder folder, com.google.gwt.dom.client.NativeEvent event, ValueUpdater<Folder> valueUpdater) {
+            app.LOG("OtherSharedTreeViewModel::render(), folder=", folder, ", parent=", parent.getString());
             if(event.getType().equals(ContextMenuEvent.getType().getName())) {
                 final int x = event.getClientX();
                 final int y = event.getClientY();
@@ -104,7 +107,6 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
     };
 
     protected ListDataProvider<String> userLevelDataProviderForIDs = new ListDataProvider<String>();
-//    protected ListDataProvider<String> userLevelDataProviderForDisplayNames = new ListDataProvider<String>();
 
     protected Map<String, ListDataProvider<Folder>> userDataProviderMap = new HashMap<String, ListDataProvider<Folder>>();
     private Map<Folder, ListDataProvider<Folder>> dataProviderMap = new HashMap<Folder, ListDataProvider<Folder>>();
@@ -119,14 +121,14 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
     @Override
     public <T> NodeInfo<?> getNodeInfo(T value) {
         if(value == null) {
-//            LOG("getNodeInfo(null), calling fetchSharingUsers(null)");
+            app.LOG("OtherSharedTreeViewModel::getNodeInfo(null), calling fetchSharingUsers(null)");
             fetchSharingUsers(null);
-//            LOG("getNodeInfo(null), called fetchSharingUsers(null)");
+            app.LOG("OtherSharedTreeViewModel::getNodeInfo(null), called fetchSharingUsers(null)");
             return new DefaultNodeInfo<String>(userLevelDataProviderForIDs, new TextCell(new SafeHtmlRenderer<String>() {
                 @Override
                 public SafeHtml render(String object) {
                     final String displayName = app.getDisplayNameForUserID(object);
-//                    LOG("render(userID = "+object+"), displayName = " + displayName);
+                    app.LOG("OtherSharedTreeViewModel::(getNodeInfo)render(String ", object, "), parameter is userID, displayName=", displayName);
                     SafeHtmlBuilder builder = new SafeHtmlBuilder();
                     render(displayName, builder);
                     return builder.toSafeHtml();
@@ -135,17 +137,16 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
                 @Override
                 public void render(String object, SafeHtmlBuilder builder) {
                     if(!object.equals(dummy)) {
-//                        LOG("render(userID [not dummy] = "+object+")");
+                        app.LOG("OtherSharedTreeViewModel::(getNodeInfo)render(String ", object, ") parameter is not [dummy]");
                         String html = AbstractImagePrototype.create(OtherSharedTreeView.images.myShared()).getHTML();
                         builder.appendHtmlConstant(html).appendHtmlConstant("&nbsp;");
                     }
-                    final String displayName = app.getDisplayNameForUserID(object);
                     builder.append(OtherSharedTreeView.Templates.INSTANCE.nameSpan(object));
                 }
             }), null, null);
         }
         else if(value instanceof String) {
-//            LOG("getNodeInfo(String "+value+"), called with userID");
+            app.LOG("OtherSharedTreeViewModel::getNodeInfo(String ", value, "), parameter is userID");
             final String userID = (String) value;
 
             if(userDataProviderMap.get(userID) == null) {
@@ -157,7 +158,7 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
             return new DefaultNodeInfo<Folder>(userIDDataProvider, folderCell, selectionModel, null);
         }
         else {
-//            LOG("getNodeInfo(Folder "+value+"), called with a folder");
+            app.LOG("OtherSharedTreeViewModel::getNodeInfo(Folder ", value, ")");
             final Folder f = (Folder) value;
             if(dataProviderMap.get(f) == null) {
                 dataProviderMap.put(f, new ListDataProvider<Folder>());
@@ -168,31 +169,27 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
         }
     }
 
-//    native void LOG(String message) /*-{
-//      console.log(message );
-//    }-*/;
-
     private void fetchSharingUsers(final Command callback) {
+        app.LOG("OtherSharedTreeViewModel::fetchSharingUsers() callback=", callback);
         GetRequest<SharingUsers> getSharingUsers = new GetRequest<SharingUsers>(SharingUsers.class, app.getApiPath(), "", "?format=json") {
             @Override
             public void onSuccess(final SharingUsers _result) {
                 userLevelDataProviderForIDs.getList().clear();
 
                 final List<String> userIDs = _result.getUserIDs();
-//                for(String userID : userIDs) {
-//                    LOG("fetchSharingUsers(): userID =" + userID);
-//                }
+                for(String userID : userIDs) {
+                    app.LOG("OtherSharedTreeViewModel::fetchSharingUsers()::onSuccess() Sharing userID=", userID);
+                }
                 final List<String> userIDsWithUnknownDisplayNames = app.filterUserIDsWithUnknownDisplayName(userIDs);
 //                for(String userID : userIDsWithUnknownDisplayNames) {
-//                    LOG("fetchSharingUsers(): userID (with unknown name) =" + userID);
+//                    app.LOG("OtherSharedTreeViewModel::fetchSharingUsers(): userID (with unknown name) =" + userID);
 //                }
 
                 userLevelDataProviderForIDs.getList().addAll(userIDs);
                 if(userLevelDataProviderForIDs.getList().isEmpty()) {
                     userLevelDataProviderForIDs.getList().add(dummy);
-//                    userLevelDataProviderForDisplayNames.getList().add(dummy);
-                } else {
-//                    userLevelDataProviderForDisplayNames.getList().addAll(app.getUserDisplayNamesForIDs(userIDs));
+                    app.LOG("OtherSharedTreeViewModel::fetchSharingUsers()::onSuccess() NO sharing users, adding [dummy]=\"", dummy, "\"");
+                    return; // Only the dummy node is present, nothing to fetch from the server
                 }
 
                 if(userIDsWithUnknownDisplayNames.size() == 0) {
@@ -232,11 +229,12 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
                 app.sessionExpired();
             }
         };
-        getSharingUsers.setHeader("X-Auth-Token", app.getUserToken());
+        getSharingUsers.setHeader(Const.X_AUTH_TOKEN, app.getUserToken());
         Scheduler.get().scheduleDeferred(getSharingUsers);
     }
 
     protected void fetchSharedContainers(final Iterator<String> userIDsIterator, final Command callback) {
+        app.LOG("OtherSharedTreeViewModel::fetchSharedContainers(), userIDsIterator=", userIDsIterator.hasNext(), ", callback=", callback);
         if(userIDsIterator.hasNext()) {
             String userID = userIDsIterator.next();
             if(userDataProviderMap.get(userID) == null) {
@@ -261,28 +259,29 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
     public boolean isLeaf(Object o) {
         if(o == null) {
             boolean result =  userLevelDataProviderForIDs.getList().isEmpty();
-//            LOG("isLeaf(null) ==> " + result);
+//            app.LOG("isLeaf(null) ==> " + result);
             return result;
         }
         else if(o instanceof Folder) {
             Folder folder = (Folder) o;
             boolean result = folder.getSubfolders().isEmpty();
-//            LOG("isLeaf(Folder "+folder+") ==> " + result);
+//            app.LOG("isLeaf(Folder "+folder+") ==> " + result);
             return result;
         }
         else {
             ListDataProvider<Folder> dp = userDataProviderMap.get(o);
             if(dp != null) {
                 boolean result =  dp.getList().isEmpty();
-//                LOG("isLeaf("+o.getClass().getName()+" "+o+") ==> " + result);
+//                app.LOG("isLeaf("+o.getClass().getName()+" "+o+") ==> " + result);
                 return result;
             }
-//            LOG("isLeaf("+o.getClass().getName()+" "+o+") ==> (true)");
+//            app.LOG("isLeaf("+o.getClass().getName()+" "+o+") ==> (true)");
             return true;
         }
     }
 
     private void fetchSharedContainers(final String userID, final ListDataProvider<Folder> dataProvider, final Command callback) {
+        app.LOG("OtherSharedTreeViewModel::fetchSharedContainers(), userID=", userID, ", callback=", callback);
         GetRequest<AccountResource> getUserSharedContainers = new GetRequest<AccountResource>(AccountResource.class, app.getApiPath(), userID, "?format=json") {
 
             @Override
@@ -319,11 +318,12 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
                 app.sessionExpired();
             }
         };
-        getUserSharedContainers.setHeader("X-Auth-Token", app.getUserToken());
+        getUserSharedContainers.setHeader(Const.X_AUTH_TOKEN, app.getUserToken());
         Scheduler.get().scheduleDeferred(getUserSharedContainers);
     }
 
     protected void fetchFolder(final String userID, final Iterator<Folder> folderIterator, final ListDataProvider<Folder> dataProvider, final Command callback) {
+        app.LOG("OtherSharedTreeViewModel::fetchFolder(), userID=", userID, " folderIterator=", folderIterator.hasNext(), ", callback=", callback);
         if(folderIterator.hasNext()) {
             final Folder f = folderIterator.next();
 
@@ -352,7 +352,7 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
                     app.sessionExpired();
                 }
             };
-            getFolder.setHeader("X-Auth-Token", app.getUserToken());
+            getFolder.setHeader(Const.X_AUTH_TOKEN, app.getUserToken());
             Scheduler.get().scheduleDeferred(getFolder);
         }
         else if(callback != null) {
@@ -365,6 +365,7 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
     }
 
     public void updateFolder(Folder folder, boolean showfiles, Command callback) {
+        app.LOG("OtherSharedTreeViewModel::updateFolder(), folder=", folder, ", showfiles=", showfiles, ", callback=", callback);
         if(dataProviderMap.get(folder) == null) {
             dataProviderMap.put(folder, new ListDataProvider<Folder>());
         }
@@ -373,6 +374,7 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
     }
 
     public void fetchFolder(final Folder f, final ListDataProvider<Folder> dataProvider, final boolean showfiles, final Command callback) {
+        app.LOG("OtherSharedTreeViewModel::fetchFolder(), folder=", f, ", showfiles=", showfiles, ", callback=", callback);
         String path = "/" + f.getContainer() + "?format=json&delimiter=/&prefix=" + URL.encodeQueryString(f.getPrefix());
         GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwnerID(), path, f) {
             @Override
@@ -411,11 +413,12 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
                 app.sessionExpired();
             }
         };
-        getFolder.setHeader("X-Auth-Token", app.getUserToken());
+        getFolder.setHeader(Const.X_AUTH_TOKEN, app.getUserToken());
         Scheduler.get().scheduleDeferred(getFolder);
     }
 
     public void initialize(Command callback) {
+        app.LOG("OtherSharedTreeViewModel::initialize(), callback=", callback);
         fetchSharingUsers(callback);
     }
 }
diff --git a/src/gr/grnet/pithos/web/client/rest/GetRequest.java b/src/gr/grnet/pithos/web/client/rest/GetRequest.java
index e087800..71ad339 100644
--- a/src/gr/grnet/pithos/web/client/rest/GetRequest.java
+++ b/src/gr/grnet/pithos/web/client/rest/GetRequest.java
@@ -82,18 +82,40 @@ public abstract class GetRequest<T extends Resource> implements ScheduledCommand
 
     public GetRequest(Class<T> resourceClass, String api, String owner, String path) {
         this(resourceClass, api, owner, path, -1, null);
+        LOG("GetRequest() resourceClass = ", resourceClass.getName(), ", api=", api, ", owner=", owner, ", path=", path);
     }
 
     public GetRequest(Class<T> resourceClass, String api, String owner, String path, T result) {
         this(resourceClass, api, owner, path, -1, result);
     }
 
+    static native void __ConsoleLog(String message) /*-{
+      try {
+        console.log(message);
+      } catch (e) {
+      }
+    }-*/;
+
+    public static void LOG(Object ...args) {
+        if(false) {
+            final StringBuilder sb = new StringBuilder();
+            for(Object arg : args) {
+                sb.append(arg);
+            }
+            if(sb.length() > 0) {
+                __ConsoleLog(sb.toString());
+            }
+        }
+    }
+
     @Override
     public void execute() {
     	if (path.contains("?"))
     		path += "&t=" + System.currentTimeMillis();
     	else
     		path += "?t=" + System.currentTimeMillis();
+        LOG("GET api = ", api, ", owner = ", owner, ", path = ", path);
+        LOG("   ==> ", api + owner + path);
         RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, api + owner + path);
 
         for (String header : headers.keySet()) {
@@ -131,6 +153,7 @@ public abstract class GetRequest<T extends Resource> implements ScheduledCommand
             retries++;
         }
         catch (RequestException e) {
+            LOG("Error in GetRequest: ", e.toString());
         }
     }
 
