Skip to content

Preserve specific error types for ingress errors#591

Open
shahrk wants to merge 1 commit intofacebook:mainfrom
shahrk:export-D92352456
Open

Preserve specific error types for ingress errors#591
shahrk wants to merge 1 commit intofacebook:mainfrom
shahrk:export-D92352456

Conversation

@shahrk
Copy link

@shahrk shahrk commented Feb 10, 2026

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: D92352456

@meta-codesync
Copy link

meta-codesync bot commented Feb 10, 2026

@shahrk has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92352456.

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: D92352456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant