Set a Timeout and handle errors with an object