Skip to content

Conversation

sauraww
Copy link
Collaborator

@sauraww sauraww commented Aug 5, 2025

Problem

Describe the problem you are trying to solve here

Solution

Provide a brief summary of your solution so that reviewers can understand your code

Environment variable changes

What ENVs need to be added or changed

Pre-deployment activity

Things needed to be done before deploying this change (if any)

Post-deployment activity

Things needed to be done after deploying this change (if any)

API changes

Endpoint Method Request body Response Body
API GET/POST, etc request response

Possible Issues in the future

Describe any possible issues that could occur because of this change

@sauraww sauraww requested a review from a team as a code owner August 5, 2025 05:02
@sauraww sauraww changed the title Tests/js openfeature tests Better Error Messages For JS Provider Aug 5, 2025
@sauraww sauraww changed the title Better Error Messages For JS Provider fix: better error messages for js provider Aug 5, 2025
@sauraww sauraww force-pushed the tests/js-openfeature-tests branch from 4c70226 to 06b01ee Compare August 6, 2025 05:17
@Datron Datron added the P0 label Sep 9, 2025
@Datron
Copy link
Collaborator

Datron commented Sep 9, 2025

needs to be rebased

@sauraww sauraww force-pushed the tests/js-openfeature-tests branch 3 times, most recently from 6d15eee to 2dcf40b Compare September 10, 2025 12:40
if (experiments && experimentgroups) {
this.cachedExperiments = experiments;
this.cachedExperimentGroups = experimentgroups;
this.lastUpdated = new Date();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be date time?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it exists

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@Datron Datron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need experiment group support in the provider? This is a resolution time thing right? Experiment bucketing should sort it out

@sauraww
Copy link
Collaborator Author

sauraww commented Sep 10, 2025

Do we need experiment group support in the provider? This is a resolution time thing right? Experiment bucketing should sort it out

What If someone needs direct experiment group information for debugging ?

if (this.defaults) {
console.log('Falling back to defaults');
if (isNetworkError(error)) {
console.warn('SuperpositionProvider: Using fallback configuration - server connection failed');
Copy link
Collaborator

@ShreyBana ShreyBana Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why warn? IMO this should be an error log, less likely for people to miss it that way. Also, feel like this would be a better way to phrase the error: Server connection failed, using fallback configuration. Basically, highlight the problem first.

@sauraww sauraww force-pushed the tests/js-openfeature-tests branch from 2dcf40b to 70ab56e Compare September 16, 2025 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants