INTEG-334: Only print result on javascript console in failed case