error handling around the synchroous section of import resolution