Notify about errors?
<p>I have this script that allows a user to rate a website but an error will be displayed when a user tries to leave or rate the website before the page loads which will confuse the user that there rating didn't go thru when it actually did. So I was wondering is it really necessary to display the error or can I leave the following error code out of my script? Is it okay?</p>

<p>error code.</p>

<pre><code>        error: function(result) {
            alert("some error occured, please try again later");
        } 
</code></pre>

<p>Here is the JavaScript code.</p>

<pre><code>function getRating(){
    $.ajax({
        type: "GET",
        url: "http://www.example.com/",
        data: "do=getrate",
        cache: false,
        success: function(result) {
            // apply star rating to element dynamically
            $("#rating").css({ width: "" + result + "%" });
             // add rating text dynamically
            $("#new-rating").text(getRatingText());
        },
        error: function(result) {
            alert("some error occured, please try again later");
        }
    });
}
</code></pre>
