Skip to content

Commit f86ff9f

Browse files
committed
Add validation error is string handling
1 parent 775e07c commit f86ff9f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

simvue/utilities.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ def parse_validation_response(
9292

9393
out: list[list[str]] = []
9494

95+
if isinstance(issues, str):
96+
return tabulate.tabulate(
97+
["Unknown", "N/A", issues],
98+
headers=["Type", "Location", "Message"],
99+
tablefmt="fancy_grid",
100+
)
101+
95102
for issue in issues:
96103
obj_type: str = issue["type"]
97104
location: list[str] = issue["loc"]

0 commit comments

Comments
 (0)