Repository navigation
fix(cdk): Remove remediation language from generic 400 error message (AI-Triage PR) - #944
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
The default 400 error message contained 'Please check your request
parameters' which violates the writing-good-error-messages guidelines:
- Embeds remediation language ('Please check...')
- Redundantly prefixes with 'HTTP Status Code: 400. Error:'
- Not specific enough to be actionable
Simplified to 'Bad request.' which is concise and does not embed
unhelpful remediation suggestions. Connectors should use
HttpResponseFilter with custom error_message templates to provide
API-specific context for 400 errors.
Related to airbytehq/airbyte-internal-issues#15976
Related to airbytehq/oncall#11577
Co-Authored-By: bot_apk <apk@cognition.ai>
🤖 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/1773146540-improve-400-error-message#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/1773146540-improve-400-error-messagePR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
PyTest Results (Fast)3 892 tests ±0 3 880 ✅ ±0 6m 49s ⏱️ +3s Results for commit fdf7a58. ± Comparison against base commit f550424. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both. |
PyTest Results (Full)3 895 tests ±0 3 883 ✅ ±0 11m 13s ⏱️ -1s Results for commit fdf7a58. ± Comparison against base commit f550424. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both. |
|
↩️ Triggering Reason: CDK PR is linked to a connector oncall issue, CI is passing or already has local/full pytest evidence, and no AI review marker is present. |
|
Correction: attempted to trigger the CDK This PR remains marked for human review/next-step decision. |
fix(cdk): Remove remediation language from generic 400 error message (AI-Triage PR)
Summary
Simplifies the CDK's default 400 error message from
"HTTP Status Code: 400. Error: Bad request. Please check your request parameters."to"Bad request.".The old message violated error message guidelines:
This is the generic fallback for any connector that doesn't define a custom
HttpResponseFilterfor 400 responses. Connectors that need API-specific context should add their ownHttpResponseFilterwith interpolated error messages (e.g.,{{ response.message }}).Related to https://github.com/airbytehq/airbyte-internal-issues/issues/15976
Related to https://github.com/airbytehq/oncall/issues/11577
Review & Testing Checklist for Human
"Bad request. The server rejected the request."would be better, or whether brevity is preferred since connectors should override this with specific messages viaHttpResponseFilter.system_error— a 400 is often aconfig_error(bad user-provided parameters). This PR does not change the classification. Verify this is intentional / acceptable to defer.default_error_mapping.py(e.g., 403, 429) still use the"HTTP Status Code: X. Error: ..."pattern. Confirm whether this inconsistency is acceptable or if a broader cleanup is expected.Notes
HttpResponseFiltertosource-paypal-transaction'slist_disputesstream) is tracked separately.Requested by: bot_apk
Devin session