Skip to content

Commit

Permalink
Slightly improve error messages (#203)
Browse files Browse the repository at this point in the history
The error messages can be slightly more explicit that 'name' is required
only if the teamType is "pulumi".

Helps with #199.
  • Loading branch information
lukehoban authored Nov 22, 2023
1 parent c6db719 commit 5a0bcd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provider/pkg/provider/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ func (t *PulumiServiceTeamResource) Check(req *pulumirpc.CheckRequest) (*pulumir

if teamType == "github" && !newsMap["githubTeamId"].HasValue() {
failures = append(failures, &pulumirpc.CheckFailure{
Reason: "github teams require a githubTeamId",
Reason: "teams with teamType 'github' require a githubTeamId",
Property: "githubTeamId",
})
}

if teamType == "pulumi" && !newsMap["name"].HasValue() {
failures = append(failures, &pulumirpc.CheckFailure{
Reason: "pulumi teams require a name",
Reason: "teams with teamType 'pulumi' require a name",
Property: "name",
})
}
Expand Down

0 comments on commit 5a0bcd5

Please sign in to comment.