fix: use correct Amplitude vardata path#88
Merged
Conversation
The Prismic Amplitude proxy serves the Experiment SDK under `/api`, so requests to `/sdk/v2/vardata` 404. Add the missing `api/` prefix to match the proxy layout used by the editor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Resolves:
Description
The Prismic Amplitude proxy serves the Experiment SDK under
/api, so requests to/sdk/v2/vardatareturn 404. Add the missingapi/prefix so flag evaluation matches the path the editor uses.Checklist
Preview
How to QA
Run
npx prismic syncfrom a repository without Type Builder access — it should no longer fail withAmplitude flag evaluation failed: 404.Note
Low Risk
Low risk one-line URL change; main risk is if any environment expects the previous non-
/apiAmplitude proxy path, which could break flag evaluation.Overview
Updates Amplitude Experiment flag evaluation to call the correct
vardataendpoint by adding the missing/apiprefix (sdk/v2/vardata→api/sdk/v2/vardata), preventing 404s when fetching flag values via the proxy.Reviewed by Cursor Bugbot for commit 93d7b48. Bugbot is set up for automated code reviews on this repo. Configure here.