HandleMessage displaying error message only once

I’m using handleMessage() to display error on my page. It’s displaying all the error fine but the issue is it will only display them once and if the user made the same mistake again after making some other mistake,handleMessage will not display the error message. This is misleading as user might not know why the system is not responding when in reality it’s because of an error.

My code:
var editor = $('#PanelForAll ').data(‘object’).editor;
editor.clearMessages();

// Handle error messages
var displayMessage = function (message, severity) {
    //console.log(‘called error message’);
    editor.handleMessages([
        {
            message: message,
            severity: severity.toUpperCase()
        }
    ]);
    
    return false;
};

if(selectedItems.length>1){    return displayMessage('Please select one row at a time to edit  ', ‘ERROR’);
}else if(!selectedItems || selectedItems.length===0){
    return displayMessage('Please select a row to edit  ', ‘ERROR’);
}

These messages are only show when they are occurring for the first time and not after that.
My console.log() is showing that the function is called every time the error is occurring.Is this a bug in skuid or am I making a mistake somewhere?