-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(webex-core): catalog failure handling #3603
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
@@ -795,8 +795,8 @@ describe('webex-core', () => { | |||
describe('#fetchClientRegionInfo()', () => { | |||
it('returns client region info', () => | |||
services.fetchClientRegionInfo().then((r) => { | |||
assert.isDefined(r.countryCode); | |||
assert.isDefined(r.timezone); | |||
assert.isDefined(r.regionCode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing due to an unrelated change in the response from the service
@@ -52,6 +52,7 @@ const Services = WebexPlugin.extend({ | |||
|
|||
props: { | |||
validateDomains: ['boolean', false, true], | |||
initFailed: ['boolean', false, true], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I'm reading this correctly, the false, true
bit means that it's not required and has a default true
- is that right? so we say that init failed before init is attempted? That doesn't feel right....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it wasn't right. I changed initFailed: 'boolean'
to add the default sequence after writing the check boolean test as it was returning undefined.. and got the default the wrong way round. Tests now cover this.
COMPLETES #< INSERT LINK TO ISSUE >
This pull request addresses
If the service catalog fails to initialize for whatever reason, e.g. network failure, the consuming application doesn't know
by making the following changes
Added a new attribute on the services called initFailed which is set if the catalog fails to init in the on webex ready handler. Consuming applications can either check webex.internal.services.initFailed directly or can listen for the change:initFailed event to spot when this occurs.
Change Type
The following scenarios where tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
I certified that
I have read and followed contributing guidelines
I discussed changes with code owners prior to submitting this pull request
I have not skipped any automated checks
All existing and new tests passed
I have updated the documentation accordingly
Make sure to have followed the contributing guidelines before submitting.