diff options
Diffstat (limited to 'openbb_platform/core/openbb_core/app/static/utils/decorators.py')
-rw-r--r-- | openbb_platform/core/openbb_core/app/static/utils/decorators.py | 13 |
1 files changed, 11 insertions, 2 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 8daefae0575..d82f90d5a6b 100644 --- a/openbb_platform/core/openbb_core/app/static/utils/decorators.py +++ b/openbb_platform/core/openbb_core/app/static/utils/decorators.py @@ -65,11 +65,20 @@ def exception_handler(func: Callable[P, R]) -> Callable[P, R]: [ str(i) for i in err.get("loc", ()) - if i not in ("standard_params", "extra_params") + if i + not in ( + "standard_params", + "extra_params", + "provider_choices", + ) ] ) - _input = err.get("input", "") msg = err.get("msg", "") + _input = ( + "..." + if msg == "Missing required argument" + else err.get("input", "") + ) error_list.append(f"[Arg] {loc} -> input: {_input} -> {msg}") error_list.insert(0, validation_error) error_str = "\n".join(error_list) |