Properly handle sync errors thrown from Zotero.HTTP.promise()