We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 055d05a commit 721eb87Copy full SHA for 721eb87
coderd/database/errors.go
@@ -16,9 +16,9 @@ const (
16
)
17
18
// IsUniqueViolation checks if the error is due to a unique violation.
19
-// If specific cunique constraints are given as arguments, the error
20
-// must be caused by one of them. If no constraints are given, this
21
-// function returns true on any unique violation.
+// If one or more specific unique constraints are given as arguments,
+// the error must be caused by one of them. If no constraints are given,
+// this function returns true for any unique violation.
22
func IsUniqueViolation(err error, uniqueConstraints ...UniqueConstraint) bool {
23
var pqErr *pq.Error
24
if errors.As(err, &pqErr) {
0 commit comments