Preserve specific error types for ingress errors#591
Open
shahrk wants to merge 1 commit intofacebook:mainfrom
Open
Preserve specific error types for ingress errors#591shahrk wants to merge 1 commit intofacebook:mainfrom
shahrk wants to merge 1 commit intofacebook:mainfrom
Conversation
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
5403341 to
799f6f2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Previously,
RequestHandlerAdaptor::onErrorwould convert ALL ingresserrors to
kErrorRead, losing the specific error type from the HTTP codec.For example, a chunked encoding parse error (
kErrorParseBody) would bereported as generic
kErrorRead, making debugging difficult.This change preserves the specific
ProxygenErrorfrom theHTTPExceptionwhen available, falling back to
kErrorReadonly when no specific erroris set. This matches the behavior already used for egress errors.
Before: Malformed chunked encoding →
kErrorReadAfter: Malformed chunked encoding →
kErrorParseBodyFor 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