Skip to content

Use IntegrationError for known failures across built-in integrations - #1365

Merged
jpreynat merged 5 commits into
mainfrom
jpreynat/integration-error-adoption
Nov 20, 2026
Merged

jpreynat merged 5 commits into
mainfrom
jpreynat/integration-error-adoption

Conversation

@jpreynat

@jpreynat jpreynat commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Context

Problem: Built-in integrations still turn rejected credentials and missing configuration into generic failures, even though the runtime and GBX now support recoverable errors.

Outcome: 33 integrations explicitly report recognized connection, configuration and input problems with safe guidance.

Proposed changes

  • Adopt IntegrationError at provider and validation boundaries, including GitHub/GitLab Files, Jira, Slack, Linear, Figma, Sentry, Mailchimp, Arcade and the tracking/visitor-auth integrations.
  • Classify OAuth refresh rejections by HTTP status and structured error code. invalid_grant requires reconnection; invalid_client/unauthorized_client require configuration attention. Failed refreshes perform no credential writes or retries.
  • Let recognized errors escape renderer fallbacks. Keep existing generic preview fallbacks and inline Mailchimp email feedback. Stop Sentry from masking outages and Discord/Formspree from treating failed requests as successful. Formspree requires documented validation codes before reporting invalid input, and submits its payload as JSON.
  • Add a runtime patch changeset and patches for the 32 affected versioned integrations. Discord retains its existing unversioned, staging-only setup. Add Front's missing production publishing task so its release executes the publisher.

Validation: bun run test --env-mode=loose passes 227 tests through the CI runner; bun run typecheck --env-mode=loose passes all 73 tasks. bun run lint, bun run format:check, git diff --check, and the Changesets release-plan check pass. API generation used the local gitbook-x OpenAPI spec. The focused suites pass 121 cases; 47 fail against the original implementation. Front's publishing task was verified with a dry run. Credential-dependent integration checks remain for CI.

Uses the GBX handling from gitbook-x#27550. Publish/rebuild after merging to activate these changes. No deployments were run. HowdyGo and Storylane are maintained outside this repository and still require publisher adoption.

Part of RND-14053

Changelog

  • [Fix] Show recovery guidance for recognized integration connection, configuration and input failures.

@linear-code

linear-code Bot commented Nov 16, 2026

Copy link
Copy Markdown

RND-14053

@changeset-bot

changeset-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6fcd32f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 33 packages
Name Type
@gitbook/runtime Patch
@gitbook/integration-arcade Patch
@gitbook/integration-bucket Patch
@gitbook/integration-cognito Patch
@gitbook/integration-crisp Patch
@gitbook/integration-figma Patch
@gitbook/integration-formspree Patch
@gitbook/integration-freshdesk Patch
@gitbook/integration-front Patch
@gitbook/integration-github-copilot Patch
@gitbook/integration-github-files Patch
@gitbook/integration-gitlab-files Patch
@gitbook/integration-heap Patch
@gitbook/integration-hotjar Patch
@gitbook/integration-jira Patch
@gitbook/integration-launchdarkly Patch
@gitbook/integration-linear Patch
@gitbook/integration-lucid Patch
@gitbook/integration-mailchimp Patch
@gitbook/integration-mixpanel Patch
@gitbook/integration-oidc Patch
@gitbook/integration-pendo Patch
@gitbook/integration-posthog Patch
@gitbook/integration-reo.dev Patch
@gitbook/integration-runkit Patch
@gitbook/integration-segment Patch
@gitbook/integration-sentry Patch
@gitbook/integration-slack Patch
@gitbook/integration-va-auth0 Patch
@gitbook/integration-va-azure Patch
@gitbook/integration-va-okta Patch
@gitbook/integration-webhook Patch
@gitbook/integration-zoominfo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

bun add https://pkg.pr.new/GitbookIO/integrations/@gitbook/api@1365

commit: 6fcd32f

@jpreynat
jpreynat requested a review from taranvohra November 16, 2026 16:27
@jpreynat
jpreynat merged commit dc3f60b into main Nov 20, 2026
15 checks passed
@jpreynat
jpreynat deleted the jpreynat/integration-error-adoption branch November 20, 2026 07:56
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.

2 participants