Commit 799f6f2
Preserve specific error types for ingress errors (#591)
Summary:
Previously, `RequestHandlerAdaptor::onError` would convert ALL ingress
errors to `kErrorRead`, losing the specific error type from the HTTP codec.
For example, a chunked encoding parse error (`kErrorParseBody`) would be
reported as generic `kErrorRead`, making debugging difficult.
This change preserves the specific `ProxygenError` from the `HTTPException`
when available, falling back to `kErrorRead` only when no specific error
is set. This matches the behavior already used for egress errors.
Before: Malformed chunked encoding → `kErrorRead`
After: Malformed chunked encoding → `kErrorParseBody`
For upload service we log the specific proxygen error but all I saw was "READ" making it difficult to figure out what the actual issue was, seeing "ParseBody" would've made the error clear
Reviewed By: dddmello
Differential Revision: D923524561 parent 8b87678 commit 799f6f2
2 files changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
100 | 116 | | |
101 | 117 | | |
102 | 118 | | |
| |||
0 commit comments