code: public static void postTaskError(final TaskCompletionListener completionListener, final String errorMessage) {
          new Handler(Looper.getMainLooper()).post(new Runnable() {
              @Override
              public void run() {
                  if (null != completionListener) {
                      completionListener.onError(errorMessage);
                  }
              }
          });
      }
docs: A helper function to post an error message to a TaskCompletionListener on the UI thread
  
  @param completionListener The TaskCompletionListener to notify
  @param errorMessage       The error message to post