Skip to content

Commit 1bc9b00

Browse files
committed
listener: reject requests with status 412 on version mismatch
I think, this better describes the use case than using the `424` HTTP status code.
1 parent bd0767b commit 1bc9b00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/listener/listener.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func (l *Listener) ProcessEvent(w http.ResponseWriter, r *http.Request) {
135135
// If the client uses an outdated rules version, reject the request but send also the current rules version
136136
// and rules for this source back to the client, so it can retry the request with the updated rules.
137137
if latestRuleVersion := l.runtimeConfig.GetRulesVersionFor(source.ID); ruleVersion != latestRuleVersion {
138-
w.WriteHeader(http.StatusFailedDependency)
138+
w.WriteHeader(http.StatusPreconditionFailed)
139139
l.writeSourceRulesInfo(w, source)
140140

141141
l.logger.Debugw("Abort event processing due to outdated rules version",

0 commit comments

Comments
 (0)