fix(http): fail fast on HTTP 413 instead of retrying - #1113
Draft
devin-ai-integration[bot] wants to merge 1 commit into
Draft
fix(http): fail fast on HTTP 413 instead of retrying#1113devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: bot_apk <apk@cognition.ai>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This CDK VersionYou can test this version of the CDK using the following: # Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@devin/1786498463-http-413-error-mapping#egg=airbyte-python-cdk[dev]' --help
# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch devin/1786498463-http-413-error-mappingPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
PyTest Results (Fast)4 231 tests +2 4 219 ✅ +2 8m 30s ⏱️ +6s Results for commit 4e5d5fa. ± Comparison against base commit 68bc294. This pull request removes 1 and adds 3 tests. Note that renamed tests count towards both. |
PyTest Results (Full)4 234 tests +2 4 222 ✅ +2 12m 37s ⏱️ -10s Results for commit 4e5d5fa. ± Comparison against base commit 68bc294. This pull request removes 1 and adds 3 tests. Note that renamed tests count towards both. |
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
HTTP 413 was missing from
DEFAULT_ERROR_MAPPING, so a 413 fell throughDefaultHttpResponseFilterintocreate_fallback_error_resolution(), which returnsRETRY+system_errorand a raw dump of the response body as the user-facing message:A 413 is deterministic for a given request — it cannot succeed on retry — so the connector burned its whole retry budget before failing, and the message it surfaced was a non-deterministic string containing the request URL, the vendor payload, and a
requestId.system_errorrather thanconfig_error: nothing in the user's source configuration causes or fixes an oversized request/response, so there is no remediation to offer the user (per the error-message guidelines, remediation hints belong only onconfig_error). The behavioral fix that matters here isFAILinstead ofRETRY. Connectors that have a stream-specific remedy (e.g. fetching an oversized transcript from a paginated endpoint) should still override this with their ownHttpResponseFilter.Resolves https://github.com/airbytehq/airbyte-internal-issues/issues/16937
Related to https://github.com/airbytehq/airbyte-internal-issues/issues/16925 (the
source-granolaconnector-side fix)Verified with
poetry run pytest unit_tests/sources/declarative/requesters/error_handlers unit_tests/sources/streams/http -q(559 passed), plus ruff check/format and mypy.Link to Devin session: https://app.devin.ai/sessions/41adb4c3c7d0496ea54a61ecac412877