Created errorHandler js class