Skip to content

Commit 0b3d0ac

Browse files
committed
Refactor project update validation to use updated validation method and improve error handling
1 parent 1618fc8 commit 0b3d0ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/services/prisma-project-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,12 @@ export class PrismaProjectService {
239239

240240
// Validate updates
241241
if (updates.name !== undefined || updates.description !== undefined) {
242-
const validation = ProjectValidator.validateCreate({
242+
const validation = ProjectValidator.validateCreateRequest({
243243
name: updates.name ?? existingProject.name,
244244
description: updates.description ?? existingProject.description,
245245
});
246246
if (!validation.success) {
247-
throw new Error(`Invalid project data: ${validation.error.issues.map((i: any) => i.message).join(', ')}`);
247+
throw new Error(`Invalid project data: ${validation.errors.map((i: any) => i.message).join(', ')}`);
248248
}
249249
}
250250

0 commit comments

Comments
 (0)