Missing error handling on empty pages (e.g, IEEExplore)
I was testing automated importing from URLs and when using a bogus IEEE URL (to test my error handling) I noticed that it neither raised an exception nor added any entry to the database. Thus I presume there is some error condition that is not handled somewhere in the IEEExlpore code. The bogus URL was https://ieeexplore.ieee.org/abstract/document/893iwaeufrs8809 and as you can see IEEE is not handling it well either ;)
I don't think we're particularly concerned about this to be honest, since Zotero has the successful import feedback. This behavior definitely isn't limited to IEEEXplore
I couldn't immediately determine what you mean by "successful import feedback" though. I would have expected a callback of some sort.
This is the code I am using currently: https://github.com/stefanct/scholar_to_zotero/blob/2cf50507cfdf0bd3c1d08063c2e5db0f354f5066/import_zotero.js
I was trying to use the "done" handler by adding the following after
setDocument()
but that returned success too. Can you please elaborate what you meant?translate.setHandler("done", function(obj, success) {
Zotero.debug("translation done: "+success);
}
);
translate()
returns a promise with the items, so you'll have an empty array when it didn't import anything.