MCPcopy
hub / github.com/cli/cli / isLabelAlreadyExistsError

Function isLabelAlreadyExistsError

pkg/cmd/label/create.go:184–186  ·  view source on GitHub ↗
(err api.HTTPError)

Source from the content-addressed store, hash-verified

182}
183
184func isLabelAlreadyExistsError(err api.HTTPError) bool {
185 return err.StatusCode == 422 && len(err.Errors) == 1 && err.Errors[0].Field == "name" && err.Errors[0].Code == "already_exists"
186}

Callers 2

createLabelFunction · 0.85
updateLabelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected