Skip to content

Commit

Permalink
last round, hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
alexweav committed Aug 23, 2024
1 parent 936611f commit 38d46d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/distributor/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func OTLPHandler(
reader = http.MaxBytesReader(nil, reader, int64(maxRecvMsgSize))
if _, err := buf.ReadFrom(reader); err != nil {
if util.IsRequestBodyTooLarge(err) {
return exportReq, 0, httpgrpc.Errorf(http.StatusRequestEntityTooLarge, distributorMaxOTLPRequestSizeErr{
return exportReq, 0, httpgrpc.Error(http.StatusRequestEntityTooLarge, distributorMaxOTLPRequestSizeErr{
actual: -1,
limit: maxRecvMsgSize,
}.Error())
Expand All @@ -137,7 +137,7 @@ func OTLPHandler(
// Check the request size against the message size limit, regardless of whether the request is compressed.
// If the request is compressed and its compressed length already exceeds the size limit, there's no need to decompress it.
if r.ContentLength > int64(maxRecvMsgSize) {
return httpgrpc.Errorf(http.StatusRequestEntityTooLarge, distributorMaxOTLPRequestSizeErr{
return httpgrpc.Error(http.StatusRequestEntityTooLarge, distributorMaxOTLPRequestSizeErr{
actual: int(r.ContentLength),
limit: maxRecvMsgSize,
}.Error())
Expand Down

0 comments on commit 38d46d9

Please sign in to comment.