Skip to content

Commit

Permalink
Revert "wfe: on rate limit error, serve 500 (#7796)" (#7900)
Browse files Browse the repository at this point in the history
This reverts commit 242d746 (#7796)

We want to make this change, but it carries some risk that we'd prefer
not to take over the holiday. We'd also like to keep `main` in a state
where it would be reasonable to deploy (even if, in practice, any
over-the-holiday deploy would be a hotfix, not a direct tag from
`main`).
  • Loading branch information
jsha authored Dec 20, 2024
1 parent 6402a22 commit d6e163c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 6 additions & 1 deletion web/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ type RequestEvent struct {
Slug string `json:",omitempty"`
InternalErrors []string `json:",omitempty"`
Error string `json:",omitempty"`
UserAgent string `json:"ua,omitempty"`
// If there is an error checking the data store for our rate limits
// we ignore it, but attach the error to the log event for analysis.
// TODO(#7796): Treat errors from the rate limit system as normal
// errors and put them into InternalErrors.
IgnoredRateLimitError string `json:",omitempty"`
UserAgent string `json:"ua,omitempty"`
// Origin is sent by the browser from XHR-based clients.
Origin string `json:",omitempty"`
Extra map[string]interface{} `json:",omitempty"`
Expand Down
5 changes: 2 additions & 3 deletions wfe2/wfe.go
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,7 @@ func (wfe *WebFrontEndImpl) NewAccount(
wfe.sendError(response, logEvent, probs.RateLimited(err.Error()), err)
return
} else {
wfe.sendError(response, logEvent, web.ProblemDetailsForError(err, "While checking rate limits"), err)
return
logEvent.IgnoredRateLimitError = err.Error()
}
}

Expand Down Expand Up @@ -2372,7 +2371,7 @@ func (wfe *WebFrontEndImpl) NewOrder(
wfe.sendError(response, logEvent, probs.RateLimited(err.Error()), err)
return
} else {
wfe.sendError(response, logEvent, web.ProblemDetailsForError(err, "While checking rate limits"), err)
logEvent.IgnoredRateLimitError = err.Error()
return
}
}
Expand Down

0 comments on commit d6e163c

Please sign in to comment.