Changed logic for waiter error. Throwed first error. Added error.code = 'WAIT_TIMEOUT'