fix(cc-store): fix store register method error handling - #590
Merged
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
akulakum
approved these changes
Jan 12, 2026
Shreyas281299
force-pushed
the
error-handling
branch
from
January 12, 2026 06:08
0a87dd5 to
c8d9fdd
Compare
bhabalan
approved these changes
Jan 12, 2026
| init(options: InitParams): Promise<void> { | ||
| return this.store.init(options, this.setupIncomingTaskHandler); | ||
| return this.store.init(options, this.setupIncomingTaskHandler).catch((error) => { | ||
| const err = error instanceof Error ? error : new Error(String(error)); |
Contributor
There was a problem hiding this comment.
Suggested change
| const err = error instanceof Error ? error : new Error(String(error)); | |
| const err = error instanceof Error | |
| ? error | |
| : new Error(`Store initialization failed: ${String(error)}`); |
| module: 'cc-store#store.ts', | ||
| method: 'init', | ||
| webex.once('ready', () => { | ||
| setupEventListeners(webex.cc); |
Contributor
There was a problem hiding this comment.
If setupEventListeners throws, we aren't doing a clearTimeout. Should we wrap the body of the entire arrow function inside a try catch and clear the timeout if anything happens and reject?
Contributor
Author
There was a problem hiding this comment.
Sure, better error handling this way
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
COMPLETES # https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7498
This pull request addresses
If an error occured during registration the sdk was not throwing the error and widgets wernt handling the error properly causing the app to be stuck in the loading screen
by making the following changes
Change Type
The following scenarios were tested
Screen.Recording.2026-01-09.at.1.00.11.PM.mov
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.