Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFE: Suppress logging of probs.PausedProblem #7719

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion probs/probs.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (
InvalidContactProblem = ProblemType("invalidContact")
MalformedProblem = ProblemType("malformed")
OrderNotReadyProblem = ProblemType("orderNotReady")
PausedProblem = ProblemType("rateLimited")
RateLimitedProblem = ProblemType("rateLimited")
RejectedIdentifierProblem = ProblemType("rejectedIdentifier")
ServerInternalProblem = ProblemType("serverInternal")
Expand Down Expand Up @@ -220,7 +221,7 @@ func RateLimited(detail string) *ProblemDetails {
// Paused returns a ProblemDetails representing a RateLimitedProblem error
func Paused(detail string) *ProblemDetails {
return &ProblemDetails{
Type: RateLimitedProblem,
Type: PausedProblem,
Detail: detail,
HTTPStatus: http.StatusTooManyRequests,
}
Expand Down
9 changes: 8 additions & 1 deletion web/send_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,15 @@ func SendError(
response.WriteHeader(http.StatusInternalServerError)
}

// Suppress logging of the "Your account is temporarily prevented from
// requesting certificates" error.
var primaryDetail string
if prob.Type == probs.PausedProblem {
primaryDetail = "caller is paused"
beautifulentropy marked this conversation as resolved.
Show resolved Hide resolved
}

// Record details to the log event
logEvent.Error = fmt.Sprintf("%d :: %s :: %s", prob.HTTPStatus, prob.Type, prob.Detail)
logEvent.Error = fmt.Sprintf("%d :: %s :: %s", prob.HTTPStatus, prob.Type, primaryDetail)
if len(prob.SubProblems) > 0 {
subDetails := make([]string, len(prob.SubProblems))
for i, sub := range prob.SubProblems {
Expand Down
Loading