8000 updates to get_score_definition to better catch errors · davidtrinhsas/python-sasctl@b27bb41 · GitHub
[go: up one dir, main page]

Skip to content

Commit b27bb41

Browse files
committed
updates to get_score_definition to better catch errors
1 parent f343f36 commit b27bb41

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sasctl/_services/score_definitions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ def create_score_definition(
8989
model_id = model["id"]
9090
else:
9191
model = cls._model_repository.get_model(model)
92+
if not model:
93+
raise HTTPError(
94+
{
95+
f"This model may not exist in a project or the model may not exist at all."
96+
}
97+
)
9298
model_id = model["id"]
9399

94100
if not model:

0 commit comments

Comments
 (0)
0