Raise proper error on timeout