mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-30 05:52:23 +00:00
add try except on metadata computing (#5456)
This commit is contained in:
@@ -367,12 +367,16 @@ class StaticCommandRunner:
|
||||
duration = perf_counter_ns() - start_ns
|
||||
|
||||
if execution_context.user_settings.preferences.metadata:
|
||||
obbject.metadata = Metadata(
|
||||
arguments=kwargs,
|
||||
duration=duration,
|
||||
route=route,
|
||||
timestamp=timestamp,
|
||||
)
|
||||
try:
|
||||
obbject.metadata = Metadata(
|
||||
arguments=kwargs,
|
||||
duration=duration,
|
||||
route=route,
|
||||
timestamp=timestamp,
|
||||
)
|
||||
except Exception as e:
|
||||
if Env().DEBUG_MODE:
|
||||
raise OpenBBError(e) from e
|
||||
|
||||
return obbject
|
||||
|
||||
|
||||
Reference in New Issue
Block a user