You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overall looks good — clean implementation that follows existing patterns well. A couple things to address:
Telemetry gap on validation failure (SDK.ts ~line 1548): The throw after MIDAUTHENTICATECHATSTARTED has no corresponding MIDAUTHENTICATECHATFAILED log. Every other failure path in this file logs the failure event before throwing. Please add:
if(!chatId||!authenticatedUserToken){this.logWithLogger(LogLevel.ERROR,OCSDKTelemetryEvent.MIDAUTHENTICATECHATFAILED,"Mid-Authenticate Chat Failed - chatId and authenticatedUserToken are required",requestId);thrownewError("chatId and authenticatedUserToken are required");}
Missing semicolon on OmnichannelEndpoints.ts:39 — every other endpoint constant has one.
No request body on POST (SDK.ts ~line 1569): The POST has headers but no data property. Other POST methods like sessionInit and sessionClose include data. Can you confirm the backend doesn't expect a body? If Content-Type: application/json is set (via Constants.defaultHeaders) but no body is sent, some middleware may reject it.
CHANGELOG heading: Use ### Added instead of ### Added MidConversationAuthenticateChat Feature to match the existing convention.
Nice work on the retry config with authCodeNonce header overwrites, the session ID update from response headers, and the thorough test coverage (13 cases). The return after reject() in the timeout path is better than several existing methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
authenticateChatendpoint in SDK for mid-conversation authenticationMidConversationAuthFailureerror handling with retry supportdeferInitialAuthsupport instartChatto skip initial auth for unauthenticated mid-auth flowMidConversationAuthfor scenario trackingTest plan
authenticateChatAPI call with valid tokenauthenticateChatfailuredeferInitialAuthskips auth duringstartChat🤖 Generated with Claude Code