diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-09-08 15:32:44 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-09-09 11:58:20 +0200 |
commit | eb28a1c08469d56494006d0f2c64933ab7078d01 (patch) | |
tree | dbacf86cf194955f34f09ec56d2df284321e2ae7 /vendor/github.com/letsencrypt/boulder/errors/errors.go | |
parent | 7e2f002b0751c2c24e9c243495cbc313d0c3c103 (diff) | |
download | podman-eb28a1c08469d56494006d0f2c64933ab7078d01.tar.gz podman-eb28a1c08469d56494006d0f2c64933ab7078d01.tar.bz2 podman-eb28a1c08469d56494006d0f2c64933ab7078d01.zip |
update buildah and c/common to latest
also includes bumps for c/storage and c/image
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'vendor/github.com/letsencrypt/boulder/errors/errors.go')
-rw-r--r-- | vendor/github.com/letsencrypt/boulder/errors/errors.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/github.com/letsencrypt/boulder/errors/errors.go b/vendor/github.com/letsencrypt/boulder/errors/errors.go index 3ca9988a6..861d54ad1 100644 --- a/vendor/github.com/letsencrypt/boulder/errors/errors.go +++ b/vendor/github.com/letsencrypt/boulder/errors/errors.go @@ -1,3 +1,13 @@ +// Package errors provides internal-facing error types for use in Boulder. Many +// of these are transformed directly into Problem Details documents by the WFE. +// Some, like NotFound, may be handled internally. We avoid using Problem +// Details documents as part of our internal error system to avoid layering +// confusions. +// +// These errors are specifically for use in errors that cross RPC boundaries. +// An error type that does not need to be passed through an RPC can use a plain +// Go type locally. Our gRPC code is aware of these error types and will +// serialize and deserialize them automatically. package errors import ( @@ -12,7 +22,10 @@ import ( // BoulderError wrapping one of these types. type ErrorType int +// These numeric constants are used when sending berrors through gRPC. const ( + // InternalServer is deprecated. Instead, pass a plain Go error. That will get + // turned into a probs.InternalServerError by the WFE. InternalServer ErrorType = iota _ Malformed @@ -101,6 +114,20 @@ func RateLimitError(msg string, args ...interface{}) error { } } +func DuplicateCertificateError(msg string, args ...interface{}) error { + return &BoulderError{ + Type: RateLimit, + Detail: fmt.Sprintf(msg+": see https://letsencrypt.org/docs/duplicate-certificate-limit/", args...), + } +} + +func FailedValidationError(msg string, args ...interface{}) error { + return &BoulderError{ + Type: RateLimit, + Detail: fmt.Sprintf(msg+": see https://letsencrypt.org/docs/failed-validation-limit/", args...), + } +} + func RejectedIdentifierError(msg string, args ...interface{}) error { return New(RejectedIdentifier, msg, args...) } |