From 9b82116c61f7ea9854bea5cefe7dfd1be9c85c19 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 10:39:56 +0200 Subject: [PATCH] Copy changes --- packages/server/src/api/routes/tests/viewV2.spec.ts | 3 ++- packages/server/src/sdk/app/views/index.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 4e98ffe3cc..663cf5c864 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -345,7 +345,8 @@ describe.each([ await config.api.viewV2.create(newView, { status: 400, body: { - message: 'You can\'t make read only the required field "name"', + message: + 'You can\'t make field "name" readonly because it is a required field.', status: 400, }, }) diff --git a/packages/server/src/sdk/app/views/index.ts b/packages/server/src/sdk/app/views/index.ts index ff51a73e99..6cdd38bf43 100644 --- a/packages/server/src/sdk/app/views/index.ts +++ b/packages/server/src/sdk/app/views/index.ts @@ -76,7 +76,7 @@ async function guardViewSchema( const viewSchemaField = viewSchema[field.name] if (viewSchemaField?.readonly) { throw new HTTPError( - `You can't make read only the required field "${field.name}"`, + `You can't make field "${field.name}" readonly because it is a required field.`, 400 ) }