-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #256 from sennetconsortium/tjmadonna/1125-more-inf…
…ormative-logs Tjmadonna/1125 more informative logs
- Loading branch information
Showing
2 changed files
with
367 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
def create_trigger_error_msg(msg: str, existing_data_dict: dict, new_data_dict: dict) -> str: | ||
"""Creates an error message for a schema trigger function by appending additional | ||
useful information to the message. | ||
Args: | ||
msg (str): The message to display before the additional information. | ||
existing_data_dict (dict): The existing data. | ||
new_data_dict (dict): The new data. | ||
Returns: | ||
str: The error message. | ||
""" | ||
return ( | ||
f"{msg} " | ||
f"UUID: {existing_data_dict.get('uuid') or new_data_dict.get('uuid')} " | ||
f"SenNet ID: {existing_data_dict.get('sennet_id') or new_data_dict.get('sennet_id')} " | ||
f"Entity type: {existing_data_dict.get('entity_type') or new_data_dict.get('entity_type')}" | ||
) |
Oops, something went wrong.