juspay / superposition

Superposition is a context-based configuration management system designed to facilitate safe and flexible rollout of config changes
https://juspay.io/open-source/superposition
Apache License 2.0
348 stars 16 forks source link

fix: using ExperimentResponse type for single experiment get response #231

Closed ShubhranshuSanjeev closed 2 months ago

ShubhranshuSanjeev commented 2 months ago

Problem

Single Experiment page generation failed with error Error fetching experiment. This happened because the API response was expected to be of Experiment type which had context as Vec<Conditions> wasn't able to de-serialize correctly.

Solution

The correct expected API response type should have been ExperimentResponse, which we overlooked.

Changes made