Does this "call the callback with a timeout error" code get duplicated in about 3 places now? Factor it out?