Skip to content

Commit b65d5da

Browse files
committed
fix: Use snake_case for project_slug query parameter in getLatestBaseSnapshot
The query parameter was incorrectly using camelCase ('projectSlug') instead of snake_case ('project_slug'), inconsistent with Sentry API conventions and all other parameters in the method. This would cause the backend to silently ignore the parameter. Co-Authored-By: Claude Sonnet 4.5 (Cursor AI Agent)
1 parent a422631 commit b65d5da

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/mcp-core/src/api-client/client.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3195,7 +3195,7 @@ export class SentryApiService {
31953195
params.set("app_id", appId);
31963196
if (branch) params.set("branch", branch);
31973197
if (project) params.set("project", project);
3198-
if (projectSlug) params.set("projectSlug", projectSlug);
3198+
if (projectSlug) params.set("project_slug", projectSlug);
31993199
if (compactMetadata) params.set("compact_metadata", "true");
32003200
const path = `/organizations/${encodeURIComponent(organizationSlug)}/preprodartifacts/snapshots/latest-base/?${params.toString()}`;
32013201
return this.requestJSON(path);

‎packages/mcp-core/src/tools/get-latest-base-snapshot.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ describe("get_latest_base_snapshot", () => {
157157
"https://sentry.io/api/0/organizations/sentry/preprodartifacts/snapshots/latest-base/",
158158
({ request }) => {
159159
const url = new URL(request.url);
160-
expect(url.searchParams.get("projectSlug")).toBe("internal");
160+
expect(url.searchParams.get("project_slug")).toBe("internal");
161161
expect(url.searchParams.get("project")).toBeNull();
162162
return HttpResponse.json(latestBaseFixture);
163163
},

0 commit comments

Comments
 (0)