move error checking into fn.getPromise