           sharingPair : encryptedObjectSharingPair
         })
         @sharingApi.shareObject(sharingRequest)
-
-        return undefined
-
+      )
       .catch (e) ->
         # DOTO - how do we handle failure when sharing an object?
         log.error('failed to share object', e)


      { principal } = @credentialLoader.getCredentials()

      Promise.join({
        @sharingApi.getObjectIndexPair(objectId)
        @cryptoServiceLoader.getObjectCryptoService(objectId)
        @directoryApi.batchGetRsaPublicKeys(uuids)
      })
      .then (objectIndexPair, objectCryptoService, uuidsToRsaPublicKeys) =>

        # create the object sharing pair from the object index pair, and encrypt it
        objectSharingPair = @engine.getObjectSharingPairFromObjectIndexPair(objectIndexPair)

          .then (objectCryptoService) =>
            encryptedSharingPair = sharedObject.encryptedSharingPair
            decryptedSharingPair = objectCryptoService.decryptToUint8Array(encryptedSharingPair)
            objectIndexPair = @engine.getObjectIndexPairFromObjectSharingPair(decryptedSharingPair)
            @sharingApi.addIndexPair(objectId, objectIndexPair)
        )
      .catch (e) ->
