Skip to content

fix(schema): Allow missing projectSlugs/issueIds in AgenticOnboardingRunSchema - #1248

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/mcp-g77-schema-validation
Open

fix(schema): Allow missing projectSlugs/issueIds in AgenticOnboardingRunSchema#1248
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/mcp-g77-schema-validation

Conversation

@sentry

@sentry sentry Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

This PR addresses issue MCP-SERVER-G77, a ZodError occurring during the validation of AgenticOnboardingRunSchema in SentryApiService.updateAgenticOnboardingStatus.

The root cause was that the projectSlugs and issueIds fields in AgenticOnboardingRunSchema were defined using .nullable(), which only accepts null values. However, the backend API would sometimes omit these fields entirely when they had no value, resulting in them being undefined in the received data. Zod's .nullable() does not consider undefined valid, leading to validation failures.

The fix involves changing .nullable() to .nullish() for both projectSlugs and issueIds in packages/mcp-core/src/api-client/schema.ts. This modification allows the schema to correctly validate both null and undefined values for these fields, aligning with the backend's behavior. The existing .transform((v) => v ?? []) will continue to correctly default both null and undefined to an empty array.

Fixes MCP-SERVER-G77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants