   querySenseAsync: (input) ->
     wordnet = @
     new Promise (resolve, reject) ->
-      wordnet.querySense input, (data) -> resolve(data)
+      wordnet.querySense input, (err, data) ->
+        if err?
+          reject err
+        else
+          resolve data
 
 
   lookupFromFiles: (files, results, word, callback) ->

  findSenseAsync: (input) ->
    wordnet = @
    new Promise (resolve, reject) ->
      wordnet.findSense input, (data) -> resolve(data)


  querySense: (input, callback) ->

        if err?
          reject err
        else
          resolve data


  findSense: (input, callback) ->
