Skip to content

Conversation

@deeleeramone
Copy link
Contributor

@deeleeramone deeleeramone commented Oct 18, 2024

  1. Why?:

    • This error is not consistently returned by providers and can be different for various endpoints within the same provider. It can result in a message being hidden as an unexpected error.

Example:

image

  1. What?:

    • Creates a new Exception class, UnauthorizedError, in: openbb_core.provider.utils.errors
    • Adds the new error to the exception handlers as HTTP status code 502.
    • The error accepts a 'provider_name' argument that will inject itself into the default message, if no message is provided.
    • Refactors Tiingo, Benzinga, and Biztoc to handle these types of errors by adding a response_callback function to the provider extension's utilities.
    • Updates some Intrinio endpoints and the response_callback function.
    • Updates the FMP response_callback function.
    • Includes the Exception type and message when it is an unexpected error.
    • Updates Tiingo historical price endpoints to allow intraday intervals.
  2. Impact:

    • Improved error handling.

    • Enhances Tiingo price data with historical intraday intervals that can be arbitrarily defined - i.e, 7m.

    • UnauthorizedError:

Screenshot 2024-10-17 at 9 32 46 PM

image

  • Unexpected error:

image

  1. Testing Done:

    • Described above.
  2. Reviewer Notes:

    • This is not scoped to refactoring all providers for this error specifically, it's a good start though.

@deeleeramone deeleeramone added bug Bugs and bug fixes platform OpenBB Platform v4 PRs for v4 labels Oct 18, 2024
@deeleeramone deeleeramone requested a review from piiq October 18, 2024 05:33
Copy link
Member

@piiq piiq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this UI is annoying. I actually need to add a separate comment to have all inline comments appear. Sorry

@deeleeramone deeleeramone requested a review from piiq October 22, 2024 21:36
@piiq piiq added this pull request to the merge queue Oct 23, 2024
Merged via the queue into develop with commit 258e158 Oct 23, 2024
9 checks passed
@piiq piiq deleted the bugfix/unauthorized-error branch October 23, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugs and bug fixes platform OpenBB Platform v4 PRs for v4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] tiingo and biztoc providers for world news in SDK and openbb-cli not working

3 participants