Issue #3174924 by joachim, xjm, smustgrave, sourabhjain, ranjith_kumar_k_u, kiwimind, catch, bnjmnm: Throw a better exception when a reference field can't find the target entity type