MCPcopy Create free account
hub / github.com/cli/cli / SubscriptionLimitError

Function SubscriptionLimitError

pkg/cmd/event/shared/subscription.go:44–51  ·  view source on GitHub ↗

SubscriptionLimitError adds the commands that free a subscription slot to err when it reports the subscription limit, and returns other errors unchanged.

(err error)

Source from the content-addressed store, hash-verified

42// SubscriptionLimitError adds the commands that free a subscription slot to err when it reports the subscription
43// limit, and returns other errors unchanged.
44func SubscriptionLimitError(err error) error {
45 if !errors.Is(err, client.ErrSubscriptionLimit) {
46 return err
47 }
48 return fmt.Errorf("%w\nTo free a slot, run `gh event subscription list` and delete one with "+
49 "`gh event subscription delete <id>`. Deleting a subscription only stops its events, "+
50 "and every subscription expires within 24 hours anyway", err)
51}

Callers 2

createRunFunction · 0.92
subscribeMethod · 0.92

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected