Skip to content

Commit e121be6

Browse files
authored
🔧 chore(vsts): raise IntegrationFormError for missing project (#92384)
1 parent f1d8ce6 commit e121be6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sentry/integrations/vsts/issues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def create_issue(self, data: Mapping[str, str], **kwargs: Any) -> Mapping[str, A
214214
"""
215215
project_id = data.get("project")
216216
if project_id is None:
217-
raise ValueError("Azure DevOps expects project")
217+
raise IntegrationFormError({"project": "Project is required."})
218218

219219
client = self.get_client()
220220

tests/sentry/integrations/vsts/test_issues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def test_create_issue_failure(self):
257257
"description": "Goodnight, sweet prince",
258258
}
259259

260-
with pytest.raises(ValueError):
260+
with pytest.raises(IntegrationFormError):
261261
self.integration.create_issue(form_data)
262262

263263
@responses.activate

0 commit comments

Comments
 (0)