Decrease Log Severity

of errors trying to read the request body.
This commit is contained in:
Maximilian Paß
2023-11-22 16:04:31 +01:00
committed by Sebastian Serth
parent 98e27ccfd6
commit ab12c9046d
2 changed files with 5 additions and 3 deletions

View File

@ -226,7 +226,7 @@ func (r *RunnerController) findRunnerMiddleware(next http.Handler) http.Handler
// See https://github.com/openHPI/poseidon/issues/54
_, readErr := io.ReadAll(request.Body)
if readErr != nil {
log.WithContext(request.Context()).WithError(readErr).Warn("Failed to discard the request body")
log.WithContext(request.Context()).WithError(readErr).Debug("Failed to discard the request body")
}
writeClientError(writer, err, http.StatusGone, request.Context())
return