Skip to content

Commit 22080b5

Browse files
committed
check branch_id validity
1 parent 3bc164e commit 22080b5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

kbcstorage/branches.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,9 @@ def branch_detail(self, branch_id="default"):
4646
"""
4747
Get branch details
4848
"""
49+
50+
if not isinstance(branch_id, str) or branch_id == "":
51+
raise ValueError(f"Invalid branch_id '{branch_id}'")
52+
4953
url = f"{self.base_url}dev-branches/{branch_id}"
5054
return self._get(url)

0 commit comments

Comments
 (0)