MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / IsConstraintError

Function IsConstraintError

app/controlplane/pkg/data/ent/ent.go:318–324  ·  view source on GitHub ↗

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

(err error)

Source from the content-addressed store, hash-verified

316
317// IsConstraintError returns a boolean indicating whether the error is a constraint failure.
318func IsConstraintError(err error) bool {
319 if err == nil {
320 return false
321 }
322 var e *ConstraintError
323 return errors.As(err, &e)
324}
325
326// selector embedded by the different Select/GroupBy builders.
327type selector struct {

Callers 10

CreateMethod · 0.92
UpdateMethod · 0.92
handleErrorFunction · 0.92
CreateMethod · 0.92
CreateMethod · 0.92
UpdateMethod · 0.92
CreateMethod · 0.92
CreateMethod · 0.92
AddResourceRoleMethod · 0.92
CreateMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected