From 1174006d30c099a17fba027effb52853e57e63d9 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Sat, 6 Apr 2024 12:53:53 +0100
Subject: [PATCH] Issue #2883025 by pameeela, joachim, mradcliffe: Exception
 messages in FieldConfig::getFieldStorageDefinition() are inaccurate

---
 core/modules/field/src/Entity/FieldConfig.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/modules/field/src/Entity/FieldConfig.php b/core/modules/field/src/Entity/FieldConfig.php
index ca59414c3306..5bb7189cad62 100644
--- a/core/modules/field/src/Entity/FieldConfig.php
+++ b/core/modules/field/src/Entity/FieldConfig.php
@@ -313,10 +313,10 @@ public function getFieldStorageDefinition() {
       }
 
       if (!$field_storage_definition) {
-        throw new FieldException("Attempted to create an instance of field with name {$this->field_name} on entity type {$this->entity_type} when the field storage does not exist.");
+        throw new FieldException("Attempted to create, modify or delete an instance of field with name {$this->field_name} on entity type {$this->entity_type} when the field storage does not exist.");
       }
       if (!$field_storage_definition instanceof FieldStorageConfigInterface) {
-        throw new FieldException("Attempted to create a configurable field of non-configurable field storage {$this->field_name}.");
+        throw new FieldException("Attempted to create, modify or delete a configurable field of non-configurable field storage {$this->field_name}.");
       }
       $this->fieldStorage = $field_storage_definition;
     }
-- 
GitLab