cloudflare / cloudflare/pingora

Error "Fail to proxy: " is unable to be suppressed with suppress_error_log

Open
#321 0 comments 0 reactions 0 assignees View on GitHub
enhancement Priority: Low
Dominant language
Rust
Stars
27.4k
Forks
1.7k
Avg merge
6h 22m
Merged PRs (30d)
3

Description

## Describe the bug

This error in pingora-proxy is being logged without the `suppress_error_log` method being called to determine if it should be suppressed: https://github.com/cloudflare/pingora/blob/38a9d556b557a10f7815f50fca6a49de146ab5be/pingora-proxy/src/lib.rs#L149

## Pingora info

Latest commit on main, using [pingora-proxy/examples/load_balancer.rs](https://github.com/cloudflare/pingora/blob/main/pingora-proxy/examples/load_balancer.rs) example

## Steps to reproduce

```
# run load balancer example of the pingora-proxy
cargo run --example load_balancer

# use openssl cli to inspect certificates
echo | openssl s_client -showcerts -connect 0.0.0.0:6189 2>/dev/null | openssl x509 -inform pem -noout -text
```

## Expected results

I'd expect that if I defined a `suppress_error_log` method, I would be able to suppress this error, just like this here: https://github.com/cloudflare/pingora/blob/38a9d556b557a10f7815f50fca6a49de146ab5be/pingora-proxy/src/lib.rs#L614-L623

## Observed results

Error is logged without the ability to suppress:

```
[2024-07-11T04:21:29Z ERROR pingora_proxy] Fail to proxy: Downstream ConnectionClosed context: while reading request headers, bytes already read: 1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.