部分响应错误

I'm using this script in a Facelet to update a value every 6 seconds. This Facelet and another Facelet are included in the same template.

<script type="text/javascript">
    $(document).ready(function(){
        // this is needed to modify request parameters 
        // as PrimeFaces does not transfer the attributes correctly 
        // and does not expose all the parameters as tag attributes
        pushOverview.cfg.request.trackMessageLength = true;
        pushOverview.connect();

        $('a[id*="inetLogo"]').append('<div class="tab_button tab_ine  tlogo"/>');
        loadOverviewCode([{name:'code',value:'#{param['code']}'}]);
        setTimeout(function (){
            checkOverviewTimer('#{param['code']}');
        },6000);
    });

    function checkOverviewTimer(share_code){
        //console.log('checkOverviewTimer for ' + share_code);
        var nameSplit = $('#codeText').text().split(':');
        var codeEmpty = (nameSplit[0] === '');
        var descEmpty = (nameSplit[1] === '');
        var bidEmpty = ($('#'+share_code+'_BID').text() === '');

        if (codeEmpty || descEmpty || bidEmpty){
            //console.log('not all data populated so lets reset a new timer for slightly shorter');
            setTimeout(function (){getOverview([{name: 'code',value:share_code}]);},3000);
        }
    }
</script>

When I search any code on the other code, I got the following ajax response:

<?xml version='1.0' encoding='UTF-8'?>
<partial-response>
    <error>
        <error-name>class java.lang.IndexOutOfBoundsException</error-name>
        <error-message><![CDATA[Index: 0, Size: 0]]></error-message>
    </error>
</partial-response>

When I remove the checkOverviewTimer('#{param['code']}'); and loadOverviewCode([{name:'code',value:'#{param['code']}'}]); from the Facelet, then it starts to work fine.