Skip to content

Commit bc84952

Browse files
NRL-518 Fix pydantic error reporting
1 parent 40750a5 commit bc84952

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

layer/nrlf/core/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
def diag_for_error(error: ErrorDetails) -> str:
1313
if error["loc"]:
14-
loc_string = ".".join(each for each in error["loc"])
14+
loc_string = ".".join(str(each) for each in error["loc"])
1515
return f"{loc_string}: {error['msg']}"
1616
else:
1717
return f"root: {error['msg']}"
1818

1919

2020
def expression_for_error(error: ErrorDetails) -> Optional[str]:
21-
return str(".".join(each for each in error["loc"]) if error["loc"] else "root")
21+
return str(".".join(str(each) for each in error["loc"]) if error["loc"] else "root")
2222

2323

2424
class OperationOutcomeError(Exception):

0 commit comments

Comments
 (0)