[js] fix error handling in object property parsing (+tests)