Skip to content

Commit

Permalink
Merge pull request #151 from monzo/log-http2-stream-closed-at-debug
Browse files Browse the repository at this point in the history
Log http2: stream closed as debug-level
  • Loading branch information
milesbxf authored May 9, 2022
2 parents 2e7ad09 + 7b37b94 commit 6273fac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ func copyErrSeverity(err error) slog.Severity {

switch {
case strings.HasSuffix(err.Error(), "read on closed response body"),
strings.HasSuffix(err.Error(), "connection reset by peer"):
strings.HasSuffix(err.Error(), "connection reset by peer"),
strings.HasSuffix(err.Error(), "http2: stream closed"):
return slog.DebugSeverity
}

Expand Down

0 comments on commit 6273fac

Please sign in to comment.