We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da9ed39 commit ca3815eCopy full SHA for ca3815e
1 file changed
apps/common/exception/handle_exception.py
@@ -68,7 +68,10 @@ def find_err_detail(exc_detail):
68
_label = get_label(key, exc_detail)
69
_value = exc_detail[key]
70
if isinstance(_value, list):
71
- return f"{_label}:{find_err_detail(_value)}"
+ for v in _value:
72
+ r = find_err_detail(ReturnDict({key: v}, serializer=exc_detail.serializer))
73
+ if r is not None:
74
+ return r
75
if isinstance(_value, ErrorDetail):
76
return f"{_label}:{find_err_detail(_value)}"
77
if isinstance(_value, dict) and len(_value.keys()) > 0:
@@ -78,7 +81,7 @@ def find_err_detail(exc_detail):
78
81
return _value
79
82
if isinstance(exc_detail, list):
80
83
for v in exc_detail:
- r = find_err_detail(v)
84
+ r = find_err_detail(ReturnDict(v, serializer=exc_detail.serializer.child))
85
if r is not None:
86
return r
87
0 commit comments