[OE-4006] - fixes for some javascript error handling