Files
CrimsonandGitHub 61cae8af0a chore: Move all CE plugins to own go modules (#780)
* Move all public connectors to ce/plugins

* Update tooling to account for new go modules under ce

* Ensure we test all CE plugins in CI

* Move Dummypay to ce/plugins for simplicity's sake in the generation scripts

* Use versioned pkg/domain in plugins

* Ensure that renovate updates all CE plugins in a single PR when pkg/domain tags are pushed to github

* Ensure Justfile commands work over all CE plugins

* Copy ce plugin go.mods in dev.Dockerfile

* Only add a go.mod for new plugins if they are ce

* Ensure generated generic client structs are named correctly for submodule

* Add coverprofile for each ce plugin

* Add set -e for Justfile for loops over plugins

* Infer go version from flake.nix in connector template tool
2026-07-01 14:53:02 +00:00

33 lines
965 B
Go

package client
import (
"errors"
"fmt"
)
var (
ErrWebhookUrlMissing = errors.New("webhook url is not set")
ErrMissingSelectedEventCategory = errors.New("selected_event_category is not set in fromPayload")
ErrWebhookSharedSecretMissing = errors.New("webhook shared secret is not set")
ErrWebhookHeaderXSignatureMissing = errors.New("missing X-Signature-Sha256 header")
ErrWebhookNameUnknown = errors.New("unknown webhook name")
ErrWebhookRequestFailed = errors.New("failed to create webhooks request")
)
type increaseError struct {
Status int `json:"status"`
Type string `json:"type"`
Title string `json:"title"`
Detail string `json:"detail"`
}
func (ie *increaseError) Error() error {
var err error
if ie.Detail == "" {
err = fmt.Errorf("%s: %s: status code: %d", ie.Type, ie.Title, ie.Status)
} else {
err = fmt.Errorf("%s: %s: status code: %d", ie.Type, ie.Detail, ie.Status)
}
return err
}