Removed duplicate error message output in js.