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 CertificatesPerDomainError(retryAfter time.Duration, msg string, args ...interface{}) error
- func CertificatesPerFQDNSetError(retryAfter time.Duration, msg string, args ...interface{}) error
- func ConflictError(msg string, args ...interface{}) error
- func ConnectionFailureError(msg string, args ...interface{}) error
- func DNSError(msg string, args ...interface{}) error
- func DuplicateError(msg string, args ...interface{}) error
- func FailedAuthorizationsPerDomainPerAccountError(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 NewOrdersPerAccountError(retryAfter time.Duration, 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 RegistrationsPerIPAddressError(retryAfter time.Duration, msg string, args ...interface{}) error
- func RegistrationsPerIPv6RangeError(retryAfter time.Duration, msg string, args ...interface{}) error
- func RejectedIdentifierError(msg string, args ...interface{}) error
- func UnauthorizedError(msg string, args ...interface{}) error
- func UnknownSerialError() error
- func UnsupportedContactError(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 ConflictError ¶
func ConnectionFailureError ¶
func DuplicateError ¶
func InternalServerError ¶
func InvalidEmailError ¶
func MalformedError ¶
func MissingSCTsError ¶
func NotFoundError ¶
func OrderNotReadyError ¶
func RateLimitError ¶
func RejectedIdentifierError ¶
func UnauthorizedError ¶
func UnknownSerialError ¶
func UnknownSerialError() error
func UnsupportedContactError ¶
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) GRPCStatus ¶
func (be *BoulderError) GRPCStatus() *status.Status
GRPCStatus implements the interface implicitly defined by gRPC's status.FromError, which uses this function to detect if the error produced by the gRPC server implementation code is a gRPC status.Status. Implementing this means that BoulderErrors serialized in gRPC response metadata can be accompanied by a gRPC status other than "UNKNOWN".
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 UnsupportedContact // The requesteed serial number does not exist in the `serials` table. UnknownSerial // The certificate being indicated for replacement already has a replacement // order. Conflict )
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.