Skip to content

fix(source-close-com): surface actionable error when Close _skip offset pagination cap is hit#76456

Draft
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1776512438-source-close-com-error-msg-skip-cap
Draft

fix(source-close-com): surface actionable error when Close _skip offset pagination cap is hit#76456
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1776512438-source-close-com-error-msg-skip-cap

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

What

Large workspaces on source-close-com (>15000 records in a resource such as contacts) fail with a generic and confusing error from the CDK fallback:

Bad request. Please check your request parameters.

The underlying cause is that Close.com's API rejects _skip offsets beyond a per-resource cap (15000 for contacts) with an HTTP 400 whose body says Input should be less than or equal to 15000. Every stream in this connector paginates via OffsetIncrement on _skip, so any sufficiently large account hits the cap, and the informative upstream message is lost behind the CDK's generic 400 fallback.

This PR improves the user-facing error so it names the actual constraint.

Resolves airbytehq/airbyte-internal-issues#16215
Related to airbytehq/oncall#12012

How

Adds a DefaultErrorHandler with a single HttpResponseFilter to every HttpRequester in the manifest. The filter matches HTTP 400 responses whose error body contains the substring less than or equal to and emits an actionable config_error:

error_handler:
  type: DefaultErrorHandler
  response_filters:
  - type: HttpResponseFilter
    action: FAIL
    http_codes:
    - 400
    error_message_contains: less than or equal to
    error_message: Close.com request offset exceeds the API's per-resource `_skip` pagination cap.
    failure_type: config_error

Non-matching 400s continue to fall through to the default CDK mapping, so existing behavior is preserved.

The repetitive diff across all 45 streams (90 requester nodes, counting both definitions and top-level streams) is intentional — the manifest is fully resolved (no YAML anchors or $refs between streams), so each requester must carry its own error_handler.

Scope and follow-ups

The parent triage issue explicitly calls out the error-message fix as an immediate, low-risk improvement that can land independently of the deeper pagination refactor. The real root cause — offset pagination that cannot retrieve more than 15000 records per resource — is not addressed here. A separate architectural change is needed to replace _skip-based pagination with either a cursor or a date-range partition router. Suggested follow-up: open a dedicated issue for the pagination refactor.

FailureType

Following the parent issue's recommendation, the classification is set to config_error rather than the CDK default system_error. This keeps the UI framing aligned with the fact that a user cannot resolve the underlying issue by retrying — the sync needs to be narrowed (or await the connector fix) before it will succeed.

Review guide

  1. airbyte-integrations/connectors/source-close-com/manifest.yaml — the 90 error_handler additions follow an identical pattern. Reviewing a single stream is sufficient to assess all of them.
  2. airbyte-integrations/connectors/source-close-com/metadata.yaml — patch version bump 0.6.150.6.16.
  3. docs/integrations/sources/close-com.md — changelog entry.

User Impact

Users hitting the Close.com _skip cap will now see:

Close.com request offset exceeds the API's per-resource _skip pagination cap.

instead of:

Bad request. Please check your request parameters.

No behavioral changes for any other code path. Not a breaking change; patch-level bump.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Link to Devin session: https://app.devin.ai/sessions/676b6d4368f945e19569f7b02d44db10

…et pagination cap is hit

Adds a DefaultErrorHandler with an HttpResponseFilter to every stream
requester. The filter matches HTTP 400 responses whose body contains
"less than or equal to" (the substring Close.com returns when the
`_skip` offset pagination cap is exceeded) and converts the generic
CDK fallback ("Bad request. Please check your request parameters.")
into an actionable config_error that names the offending constraint.

Resolves airbytehq/airbyte-internal-issues#16215
@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
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • 🛠️ Quick Fixes
    • /format-fix - Fixes most formatting issues.
    • /bump-version - Bumps connector versions, scraping changelog description from the PR title.
      • Bump types: patch (default), minor, major, major_rc, rc, promote.
      • The rc type is a smart default: applies minor_rc if stable, or bumps the RC number if already RC.
      • The promote type strips the RC suffix to finalize a release.
      • Example: /bump-version type=rc or /bump-version type=minor
    • /bump-progressive-rollout-version - Alias for /bump-version type=rc. Bumps with an RC suffix and enables progressive rollout.
  • ❇️ AI Testing and Review (internal link: AI-SDLC Docs):
    • /ai-prove-fix - Runs prerelease readiness checks, including testing against customer connections.
    • /ai-canary-prerelease - Rolls out prerelease to 5-10 connections for canary testing.
    • /ai-review - AI-powered PR review for connector safety and quality gates.
  • 🚀 Connector Releases:
    • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
  • ☕️ JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
  • 🐍 Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.
  • ⚙️ Admin commands:
    • /force-merge reason="<REASON>" - Force merges the PR using admin privileges, bypassing CI checks. Requires a reason.
      Example: /force-merge reason="CI is flaky, tests pass locally"
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@github-actions
Copy link
Copy Markdown
Contributor

source-close-com Connector Test Results

14 tests   9 ✅  1m 24s ⏱️
 1 suites  4 💤
 1 files    1 ❌

For more details on these failures, see this check.

Results for commit 1240385.

@github-actions
Copy link
Copy Markdown
Contributor

Deploy preview for airbyte-docs ready!

Project:airbyte-docs
Status: ✅  Deploy successful!
Preview URL:https://airbyte-docs-oef6669vl-airbyte-growth.vercel.app
Latest Commit:1240385

Deployed with vercel-action

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