Change record status: 
Project: 
Introduced in branch: 
10.1.x
Introduced in version: 
10.1.0
Description: 

EntityReferenceItem throws an improved exception message when used as a base field and the entity type that the field references doesn't exist. Previously, the exception was PluginNotFoundException, which didn't really explain the issue.

Previous exception

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "taxonomy_term" entity type does not exist.

Improved exception

Drupal\Core\Field\FieldException: Field 'foo' on entity type 'my_entity' references a target entity type 'taxonomy_term' which does not exist.

Code that responds to exceptions from entity reference may need to be updated for this change.

Impacts: 
Module developers