Rewrote ErrorHandling js class