Skip to content

Commit 72e4443

Browse files
committed
fix: make defaultRegion optional in project API response for version-skew safety
1 parent 7fef7cf commit 72e4443

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • packages/core/src/v3/schemas

packages/core/src/v3/schemas/api.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ export const GetProjectResponseBody = z.object({
3838
slug: z.string(),
3939
createdAt: z.coerce.date(),
4040
// Worker-group name of the project's default region, or null when unset
41-
// (the project falls back to the global platform default).
42-
defaultRegion: z.string().nullable(),
41+
// (the project falls back to the global platform default). Optional so a
42+
// newer client still parses responses from an older server that omits it.
43+
defaultRegion: z.string().nullable().optional(),
4344
organization: z.object({
4445
id: z.string(),
4546
title: z.string(),

0 commit comments

Comments
 (0)