Entity Id Modification Error¶
entity_id_modification_error
¶
Module defining the EntityIdModificationError exception.
EntityIdModificationError
¶
Bases: Error[dict[str, object]]
Raised when there is an attempt to modify an entity's identifier after it has been set.
Source code in src/forging_blocks/domain/errors/entity_id_modification_error.py
__init__(class_name: str, attribute_name: str, current_value: object) -> None
¶
Initialise the error with the class, attribute, and current value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
class_name
|
str
|
Name of the class whose identifier was targeted. |
required |
attribute_name
|
str
|
Name of the attribute that was being modified. |
required |
current_value
|
object
|
The current (immutable) value of the identifier. |
required |