Skip to content

Commit

Permalink
rename exception for better localization
Browse files Browse the repository at this point in the history
  • Loading branch information
montezdesousa committed Aug 2, 2023
1 parent 49fe650 commit 0b3b30e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions openbb_sdk/sdk/core/openbb_core/app/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def get_command(self, route: str) -> Optional[Callable]:
return self._map.get(route, None)


class ExtensionError(Exception):
class LoadingError(Exception):
pass


Expand All @@ -419,7 +419,7 @@ def from_extensions() -> Router:
prefix=f"/{entry_point.name}",
)
except Exception as e:
raise ExtensionError(
raise LoadingError(
f"Invalid extension '{entry_point.name}': {e}"
) from e

Expand Down
4 changes: 2 additions & 2 deletions openbb_sdk/sdk/provider/openbb_provider/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def include_provider(self, provider: Provider) -> None:
self._providers[provider.name.lower()] = provider


class ExtensionError(Exception):
class LoadingError(Exception):
pass


Expand All @@ -33,7 +33,7 @@ def from_extensions() -> Registry:
provider=entry_point.load(),
)
except Exception as e:
raise ExtensionError(
raise LoadingError(
f"Invalid provider '{entry_point.name}': {e}"
) from e

Expand Down

0 comments on commit 0b3b30e

Please sign in to comment.