Skip to content

fix(cdk): Classify HTTP 400 as config error#1033

Draft
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1779545060-dutchie-error-classification
Draft

fix(cdk): Classify HTTP 400 as config error#1033
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1779545060-dutchie-error-classification

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented May 23, 2026

Summary

Related to https://github.com/airbytehq/oncall/issues/12695:

  • https://github.com/airbytehq/oncall/issues/12695

  • Classify the CDK's default HTTP 400 Bad request error as config_error instead of system_error.

  • Update declarative default error handler coverage so 400 response filters inherit the corrected failure type.

  • Update HTTP client exception coverage for retry, default backoff, and rate-limit paths to expect config_error for 400 responses.

  • Update resumable full refresh failure coverage so emitted trace errors also expect the corrected 400 classification.

Declarative-First Evaluation

The affected source is a custom Connector Builder/declarative manifest using the CDK DefaultErrorHandler. The manifest can override individual responses, but the Sentry-highlighted message is emitted by the shared CDK default mapping, so the targeted fix belongs in the CDK runtime rather than a custom Python component or checked-in connector manifest.

Breaking Change Evaluation

Not breaking. This changes failure classification metadata for HTTP 400 errors only; it does not change schemas, streams, specs, state, or connector configuration.

Review & Testing Checklist for Human

  • Confirm config_error is the intended default classification for HTTP 400 responses from declarative HTTP sources.
  • Confirm any downstream Sentry grouping or alerting that depends on system_error for 400s is expected to change.
  • Verify the next CDK release notes capture this user-visible classification change through the existing dynamic release workflow.

Notes

Tested locally:

  • poetry run pytest unit_tests/sources/mock_server_tests/test_resumable_full_refresh.py::ResumableFullRefreshStreamTest::test_resumable_full_refresh_failure unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py unit_tests/sources/streams/http/test_http_client.py -x — 93 passed.
  • poetry run ruff check airbyte_cdk/sources/streams/http/error_handlers/default_error_mapping.py unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py unit_tests/sources/streams/http/test_http_client.py unit_tests/sources/mock_server_tests/test_resumable_full_refresh.py — passed.
  • poetry run ruff format --check airbyte_cdk/sources/streams/http/error_handlers/default_error_mapping.py unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py unit_tests/sources/streams/http/test_http_client.py unit_tests/sources/mock_server_tests/test_resumable_full_refresh.py — passed.

Also attempted the full poetry run pytest unit_tests/ -x; collection currently fails before these tests on missing optional dependency langchain_core in unit_tests/destinations/vector_db_based/config_test.py.

Link to Devin session: https://app.devin.ai/sessions/8b487aeb34c84f1b98385651d74261f2

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This CDK Version

You 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/1779545060-dutchie-error-classification#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/1779545060-dutchie-error-classification

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /prerelease - Triggers a prerelease publish with default arguments
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 23, 2026

PyTest Results (Fast)

4 069 tests  ±0   4 058 ✅ ±0   7m 39s ⏱️ -5s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 51951c3. ± Comparison against base commit f67a9d9.

This pull request removes 4 and adds 4 tests. Note that renamed tests count towards both.
unit_tests.sources.declarative.requesters.error_handlers.test_default_error_handler ‑ test_default_error_handler_with_custom_response_filter[_with_http_response_status_400_fail_with_default_failure_type-400-test_response_filter0-ResponseAction.RETRY-FailureType.system_error-HTTP Status Code: 400. Error: Bad request. Please check your request parameters.]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.system_error-test error message-DefaultBackoffException]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.system_error-test error message-RateLimitBackoffException]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.system_error-test error message-UserDefinedBackoffException]
unit_tests.sources.declarative.requesters.error_handlers.test_default_error_handler ‑ test_default_error_handler_with_custom_response_filter[_with_http_response_status_400_fail_with_default_failure_type-400-test_response_filter0-ResponseAction.RETRY-FailureType.config_error-HTTP Status Code: 400. Error: Bad request. Please check your request parameters.]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.config_error-test error message-DefaultBackoffException]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.config_error-test error message-RateLimitBackoffException]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.config_error-test error message-UserDefinedBackoffException]

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

PyTest Results (Full)

4 072 tests  ±0   4 060 ✅ ±0   11m 29s ⏱️ +32s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 51951c3. ± Comparison against base commit f67a9d9.

This pull request removes 4 and adds 4 tests. Note that renamed tests count towards both.
unit_tests.sources.declarative.requesters.error_handlers.test_default_error_handler ‑ test_default_error_handler_with_custom_response_filter[_with_http_response_status_400_fail_with_default_failure_type-400-test_response_filter0-ResponseAction.RETRY-FailureType.system_error-HTTP Status Code: 400. Error: Bad request. Please check your request parameters.]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.system_error-test error message-DefaultBackoffException]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.system_error-test error message-RateLimitBackoffException]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.system_error-test error message-UserDefinedBackoffException]
unit_tests.sources.declarative.requesters.error_handlers.test_default_error_handler ‑ test_default_error_handler_with_custom_response_filter[_with_http_response_status_400_fail_with_default_failure_type-400-test_response_filter0-ResponseAction.RETRY-FailureType.config_error-HTTP Status Code: 400. Error: Bad request. Please check your request parameters.]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.config_error-test error message-DefaultBackoffException]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.config_error-test error message-RateLimitBackoffException]
unit_tests.sources.streams.http.test_http_client ‑ test_send_with_retry_raises_airbyte_traced_exception_with_failure_type[400-FailureType.config_error-test error message-UserDefinedBackoffException]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants