summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPratyush Shukla <ps4534@nyu.edu>2024-03-07 23:45:41 +0530
committerGitHub <noreply@github.com>2024-03-07 18:15:41 +0000
commitf24e9713792ddd4c69eb518029a9246e9597375e (patch)
tree960bd6ed227c2207bae5610bc4c077fde93cd539
parent48c508b292a49cdfdf29cde547fe0cb4b32e0466 (diff)
exception in debug mode shows complete argument (#6174)
-rw-r--r--openbb_platform/core/openbb_core/app/static/utils/decorators.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbb_platform/core/openbb_core/app/static/utils/decorators.py b/openbb_platform/core/openbb_core/app/static/utils/decorators.py
index 18eadeffa69..0d44b87427c 100644
--- a/openbb_platform/core/openbb_core/app/static/utils/decorators.py
+++ b/openbb_platform/core/openbb_core/app/static/utils/decorators.py
@@ -62,7 +62,8 @@ def exception_handler(func: Callable[P, R]) -> Callable[P, R]:
validation_error = f"{e.error_count()} validations errors in {e.title}"
for error in e.errors():
- arg_error = f"Arg {error['loc'][0]} ->\n"
+ arg = ".".join(map(str, error["loc"]))
+ arg_error = f"Arg {arg} ->\n"
error_details = (
f" {error['msg']} "
f"[validation_error_type={error['type']}, "