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 ) }