Skip to content

Commit

Permalink
Fail on client instantiation if base_url is None or empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
erlendvollset committed Dec 1, 2023
1 parent 6ec2c15 commit 314cd26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cognite/client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def debug(self, value: bool) -> None:
def _validate_config(self) -> None:
if not self.project:
raise ValueError(f"Invalid value for ClientConfig.project: <{self.project}>")
if not self.base_url:
raise ValueError(f"Invalid value for ClientConfig.base_url: <{self.base_url}>")

def __str__(self) -> str:
return pprint.pformat(self.__dict__, indent=4)
Expand Down

0 comments on commit 314cd26

Please sign in to comment.