From 5912c2b129f9888268a95afa23514668dcb97d43 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 31 May 2024 13:30:05 +0200 Subject: [PATCH] Copy change --- packages/server/src/api/routes/tests/viewV2.spec.ts | 3 +-- packages/server/src/sdk/app/views/index.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 962d6e82a3..7e02966b44 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -349,8 +349,7 @@ describe.each([ await config.api.viewV2.create(newView, { status: 400, body: { - message: - 'Field "name" cannot be readonly as it is a required field', + message: 'You can\'t make the required field "name" read only', status: 400, }, }) diff --git a/packages/server/src/sdk/app/views/index.ts b/packages/server/src/sdk/app/views/index.ts index 18ab94be21..150fe2c678 100644 --- a/packages/server/src/sdk/app/views/index.ts +++ b/packages/server/src/sdk/app/views/index.ts @@ -60,7 +60,7 @@ async function guardViewSchema( if (isRequired(tableSchemaField.constraints)) { throw new HTTPError( - `Field "${field}" cannot be readonly as it is a required field`, + `You can't make the required field "${field}" read only`, 400 ) }