diff --git a/openbb_platform/core/openbb_core/app/static/package_builder.py b/openbb_platform/core/openbb_core/app/static/package_builder.py index 5db17483a191..11fcc5766b0a 100644 --- a/openbb_platform/core/openbb_core/app/static/package_builder.py +++ b/openbb_platform/core/openbb_core/app/static/package_builder.py @@ -319,6 +319,8 @@ def get_function_hint_type_list(cls, func: Callable) -> List[Type]: hint_type_list.append(parameter.annotation) if return_type: + if not issubclass(return_type, OBBject): + raise ValueError("Return type must be an OBBject.") hint_type = get_args(get_type_hints(return_type)["results"])[0] hint_type_list.append(hint_type)