Skip to content

Commit

Permalink
429 -> 503
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Jul 26, 2024
1 parent a7b49c6 commit 51134bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/example-gcp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func main() {
if err != nil {
if errors.Is(err, tessera.ErrPushback) {
w.Header().Add("Retry-After", "1")
w.WriteHeader(http.StatusTooManyRequests)
w.WriteHeader(http.StatusServiceUnavailable)
return
}
w.WriteHeader(http.StatusInternalServerError)
Expand Down
2 changes: 1 addition & 1 deletion log.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const DefaultBatchMaxSize = 1
// entries with indices assigned but which have not yet been integrated into the tree.
//
// Personalities encountering this error should apply back-pressure to the source of new entries
// in an appropriate manner (e.g. for HTTP services, return a 429 with a Retry-After header).
// in an appropriate manner (e.g. for HTTP services, return a 503 with a Retry-After header).
var ErrPushback = errors.New("too many unintegrated entries")

// NewCPFunc is the signature of a function which knows how to format and sign checkpoints.
Expand Down

0 comments on commit 51134bd

Please sign in to comment.