Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 07a5eda

Browse files
authored
Help examine Error reading request body: unexpected EOF, url=/_bulk (#1290)
Everything at `debug` level of course...
1 parent 217ace4 commit 07a5eda

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

quesma/frontend_connectors/dispatcher.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ func PeekBodyV2(r *http.Request) ([]byte, error) {
448448
if err != nil {
449449
logger.ErrorWithCtxAndReason(r.Context(), "incomplete request").
450450
Msgf("Error reading request body: %v, url=%v", err, r.URL)
451+
// To further examine erroneous body sent from the client
452+
logger.DebugWithCtx(r.Context()).Msgf("Failed peek body\nHeaders=[%v]\nBody read=[%s]", r.Header, reqBody)
451453
return nil, err
452454
}
453455

0 commit comments

Comments
 (0)