error JS handle page