Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: OpenBB-finance/OpenBB
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2039eb94a2088d0ee2584548cacbfd1de945f148
Choose a base ref
..
head repository: OpenBB-finance/OpenBB
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3252bfe4e647dc05d3e2a73ef7b779a24fefaaac
Choose a head ref
14 changes: 3 additions & 11 deletions openbb_platform/core/openbb_core/app/static/utils/decorators.py
Original file line number Diff line number Diff line change
@@ -48,15 +48,8 @@ def wrapper(*f_args, **f_kwargs):
try:
return func(*f_args, **f_kwargs)
except (ValidationError, Exception) as e:
# If the DEBUG_MODE is enabled, raise the exception with complete traceback
if Env().DEBUG_MODE:
raise

# Get the last traceback object from the exception
tb = e.__traceback__
while tb.tb_next is not None:
tb = tb.tb_next

if isinstance(e, ValidationError):
error_list = []

@@ -74,14 +67,13 @@ def wrapper(*f_args, **f_kwargs):

error_list.insert(0, validation_error)
error_str = "\n".join(error_list)

raise OpenBBError(
f"\nType -> ValidationError \n\nDetails -> {error_str}"
).with_traceback(tb) from None
) from None

# If the error is not a ValidationError, then it is a generic exception
raise OpenBBError(
f"\nType -> {e.original.__class__.__name__}\n\nDetail -> {str(e)}"
).with_traceback(tb) from None
f"\nType -> {e.original.original.__class__.__name__}\n\nDetail -> {str(e)}"
) from None

return wrapper
Original file line number Diff line number Diff line change
@@ -81,13 +81,13 @@ interactions:
Cache-Control:
- private
Content-Disposition:
- attachment;filename=DP_LIVE_26012024223440840.csv
- attachment;filename=DP_LIVE_29022024202126043.csv
Content-Encoding:
- gzip
Content-Type:
- text/csv
Date:
- Fri, 26 Jan 2024 21:34:39 GMT
- Thu, 29 Feb 2024 19:21:25 GMT
Transfer-Encoding:
- chunked
Vary:
Original file line number Diff line number Diff line change
@@ -75,13 +75,13 @@ interactions:
Cache-Control:
- private
Content-Disposition:
- attachment;filename=DP_LIVE_26012024223438996.csv
- attachment;filename=DP_LIVE_29022024202124574.csv
Content-Encoding:
- gzip
Content-Type:
- text/csv
Date:
- Fri, 26 Jan 2024 21:34:38 GMT
- Thu, 29 Feb 2024 19:21:23 GMT
Transfer-Encoding:
- chunked
Vary:
Original file line number Diff line number Diff line change
@@ -205,13 +205,13 @@ interactions:
Cache-Control:
- private
Content-Disposition:
- attachment;filename=DP_LIVE_26012024223439918.csv
- attachment;filename=DP_LIVE_29022024202125308.csv
Content-Encoding:
- gzip
Content-Type:
- text/csv
Date:
- Fri, 26 Jan 2024 21:34:39 GMT
- Thu, 29 Feb 2024 19:21:24 GMT
Transfer-Encoding:
- chunked
Vary:
Loading