Documentation ¶
Overview ¶
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.
Index ¶
- func AlreadyRevokedError(msg string, args ...interface{}) error
- func BadCSRError(msg string, args ...interface{}) error
- func BadPublicKeyError(msg string, args ...interface{}) error
- func BadRevocationReasonError(reason int64) error
- func CAAError(msg string, args ...interface{}) error
- func ConnectionFailureError(msg string, args ...interface{}) error
- func DNSError(msg string, args ...interface{}) error
- func DuplicateCertificateError(retryAfter time.Duration, msg string, args ...interface{}) error
- func DuplicateError(msg string, args ...interface{}) error
- func FailedValidationError(retryAfter time.Duration, msg string, args ...interface{}) error
- func InternalServerError(msg string, args ...interface{}) error
- func InvalidEmailError(msg string, args ...interface{}) error
- func MalformedError(msg string, args ...interface{}) error
- func MissingSCTsError(msg string, args ...interface{}) error
- func New(errType ErrorType, msg string, args ...interface{}) error
- func NotFoundError(msg string, args ...interface{}) error
- func OrderNotReadyError(msg string, args ...interface{}) error
- func RateLimitError(retryAfter time.Duration, msg string, args ...interface{}) error
- func RegistrationsPerIPError(retryAfter time.Duration, msg string, args ...interface{}) error
- func RejectedIdentifierError(msg string, args ...interface{}) error
- func UnauthorizedError(msg string, args ...interface{}) error
- type BoulderError
- type ErrorType
- type SubBoulderError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlreadyRevokedError ¶
func BadCSRError ¶
func BadPublicKeyError ¶
func ConnectionFailureError ¶
func DuplicateError ¶
func FailedValidationError ¶
func InternalServerError ¶
func InvalidEmailError ¶
func MalformedError ¶
func MissingSCTsError ¶
func NotFoundError ¶
func OrderNotReadyError ¶
func RateLimitError ¶
func RegistrationsPerIPError ¶
func RejectedIdentifierError ¶
func UnauthorizedError ¶
Types ¶
type BoulderError ¶
type BoulderError struct { Type ErrorType Detail string SubErrors []SubBoulderError // RetryAfter the duration a client should wait before retrying the request // which resulted in this error. RetryAfter time.Duration }
BoulderError represents internal Boulder errors
func (*BoulderError) Error ¶
func (be *BoulderError) Error() string
func (*BoulderError) Unwrap ¶
func (be *BoulderError) Unwrap() error
func (*BoulderError) WithSubErrors ¶
func (be *BoulderError) WithSubErrors(subErrs []SubBoulderError) *BoulderError
WithSubErrors returns a new BoulderError instance created by adding the provided subErrs to the existing BoulderError.
type ErrorType ¶
type ErrorType int
ErrorType provides a coarse category for BoulderErrors. Objects of type ErrorType should never be directly returned by other functions; instead use the methods below to create an appropriate BoulderError wrapping one of these types.
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 NotFound RateLimit RejectedIdentifier InvalidEmail ConnectionFailure CAA MissingSCTs Duplicate OrderNotReady DNS BadPublicKey BadCSR AlreadyRevoked BadRevocationReason )
These numeric constants are used when sending berrors through gRPC.
type SubBoulderError ¶
type SubBoulderError struct { *BoulderError Identifier identifier.ACMEIdentifier }
SubBoulderError represents sub-errors specific to an identifier that are related to a top-level internal Boulder error.