Skip to content

Commit

Permalink
[Community] add InvalidBotConfigError
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Jan 26, 2024
1 parent 683f186 commit 336c905
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions octobot/community/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ class MissingBotConfigError(BotError):
pass


class InvalidBotConfigError(BotError):
pass


class MissingProductConfigError(BotError):
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ async def fetch_bot_profile_data(self, bot_config_id: str) -> commons_profiles.P
portfolio = (bot_config.get(
enums.BotConfigKeys.OPTIONS.value
) or {}).get("portfolio")
if not portfolio:
raise errors.InvalidBotConfigError("Missing portfolio in bot config")
if trading_api.is_usd_like_coin(profile_data.trading.reference_market):
usd_like_asset = profile_data.trading.reference_market
else:
Expand Down

0 comments on commit 336c905

Please sign in to comment.