Update I got it to post an error now using this code, and I had to create a local resource notFound and map the two together.
var errorText = localStorage.getItem('notFound') ;
if(errorText != ""){
localStorage.removeItem('notFound');
alert(errorText);
}
But I have the issue of the error it displays saying null, how do i change the error text?