Skip to content

fix(KNO-14505): handle guide engagement API failures - #1053

Draft
kylemcd wants to merge 2 commits into
mainfrom
kyle-kno-14505-sdk-prevent-guide-engagement-api-failures-from-becoming
Draft

fix(KNO-14505): handle guide engagement API failures#1053
kylemcd wants to merge 2 commits into
mainfrom
kyle-kno-14505-sdk-prevent-guide-engagement-api-failures-from-becoming

Conversation

@kylemcd

@kylemcd kylemcd commented Jul 29, 2026

Copy link
Copy Markdown
Member

Description

  • The guide client started engagement requests without rejection handlers. API failures then caused global unhandled promise rejections.
  • Each guide action now catches and logs its engagement request failures.
  • Guide actions still update local state before the requests complete.
  • UserClient now throws the original API error with its HTTP status and response data.

Release

  • The changeset adds patch releases for @knocklabs/client and @knocklabs/react.
  • Linear: KNO-14505.

Validation

  • The client test suite passed 631 tests.
  • The client type check passed.
  • The client lint check passed.
  • The changeset check passed.

Checklist

  • Tests cover the new guide engagement behavior and API error details.

@linear-code

linear-code Bot commented Jul 29, 2026

Copy link
Copy Markdown

KNO-14505

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
javascript-ms-teams-connect-example Ready Ready Preview, Comment Jul 29, 2026 1:24pm
javascript-nextjs-example Ready Ready Preview, Comment Jul 29, 2026 1:24pm
javascript-slack-connect-example Ready Ready Preview, Comment Jul 29, 2026 1:24pm
javascript-slack-kit-example Ready Ready Preview, Comment Jul 29, 2026 1:24pm

Request Review

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9bda75d

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

This PR includes changesets to release 6 packages
Name Type
@knocklabs/client Patch
@knocklabs/react Patch
ms-teams-connect-example Patch
nextjs-app-dir-example Patch
slack-connect-example Patch
slack-kit-example 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

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 995 bytes (0.16%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@knocklabs/client-client-esm 87.57kB 569 bytes (0.65%) ⬆️
@knocklabs/client-client-cjs 63.8kB 426 bytes (0.67%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: @knocklabs/client-client-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
clients/guide/client.mjs 517 bytes 25.87kB 2.04%
clients/users/index.mjs 52 bytes 3.27kB 1.62%

Files in clients/guide/client.mjs:

  • ./src/clients/guide/client.ts → Total Size: 30.66kB

Files in clients/users/index.mjs:

  • ./src/clients/users/index.ts → Total Size: 3.42kB
view changes for bundle: @knocklabs/client-client-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
clients/guide/client.js 394 bytes 18.74kB 2.15%
clients/users/index.js 32 bytes 2.73kB 1.19%

Files in clients/guide/client.js:

  • ./src/clients/guide/client.ts → Total Size: 30.84kB

Files in clients/users/index.js:

  • ./src/clients/users/index.ts → Total Size: 3.44kB

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.64%. Comparing base (f62d7b9) to head (9bda75d).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1053      +/-   ##
==========================================
+ Coverage   66.58%   66.64%   +0.06%     
==========================================
  Files         214      214              
  Lines       10514    10533      +19     
  Branches     1528     1536       +8     
==========================================
+ Hits         7001     7020      +19     
  Misses       3487     3487              
  Partials       26       26              
Files with missing lines Coverage Δ
packages/client/src/clients/guide/client.ts 95.74% <100.00%> (+0.08%) ⬆️
packages/client/src/clients/users/index.ts 93.80% <100.00%> (+0.05%) ⬆️

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.

1 participant