enhance user_communicator.py

This commit is contained in:
Sina Atalay 2024-02-10 21:30:39 +01:00
parent 2f300144ec
commit 8d0c5f4120
1 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,8 @@ def handle_validation_error(exception: pydantic.ValidationError):
message = message
else:
message = custom_error[0]
location = f"{location}.{custom_error[1]}"
if custom_error[1] != "":
location = f"{location}.{custom_error[1]}"
input = custom_error[2]
new_errors.append({
@ -122,6 +123,7 @@ def handle_validation_error(exception: pydantic.ValidationError):
)
print(table)
print()
def handle_exceptions(function: Callable) -> Callable: