Skip to content

Conversation

@Adoliin
Copy link

@Adoliin Adoliin commented Jun 20, 2025

Previously, _lazy_load_price_history would catch and log errors using logger.error, then return None, effectively ignoring the raise_errors parameter passed to ticker.history(). This made it difficult to properly handle exceptions downstream.

For example, even with the following usage:

ticker.history(
# ...
    raise_errors=True,
)

the expected exception wasn’t raised (just logged and suppressed). This PR fixes that by properly propagating the raise_errors parameter and raising the exception when it's set to True.

@Adoliin Adoliin changed the title Raise exception instead of only logging and returning None Fix raising exception instead of only logging and returning None when calling _lazy_load_price_history Jun 20, 2025
@Adoliin Adoliin changed the title Fix raising exception instead of only logging and returning None when calling _lazy_load_price_history Fix raising errors by propagating raise_errors in _lazy_load_price_history Jun 20, 2025
@Adoliin Adoliin changed the title Fix raising errors by propagating raise_errors in _lazy_load_price_history Fix raising errors instead of just logging them by propagating raise_errors in _lazy_load_price_history Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant