Skip to content

Commit 2b1715e

Browse files
committed
fix(V2): clarify ownership restriction message
Make V2 mutation ownership failures describe that only the home organization that created the record can modify it.
1 parent ce1577e commit 2b1715e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/models/v2/staging-v2.model.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,15 @@ class StagingV2 extends Model {
256256
) {
257257
if (unresolvedFields.length > 0) {
258258
throw new Error(
259-
`Restricted data: cannot determine the owner of this ${table} record from ${unresolvedFields.join(', ')}. Only the home organization can modify this record.`,
259+
`Restricted data: cannot determine the owner of this ${table} record from ${unresolvedFields.join(', ')}. Only the home organization that created this record can modify it.`,
260260
);
261261
}
262262

263263
if (ownerOrgUids.length === 0) {
264264
if (!requireOwner) return;
265265

266266
throw new Error(
267-
`Restricted data: cannot determine the owner of this ${table} record. Only the home organization can modify this record.`,
267+
`Restricted data: cannot determine the owner of this ${table} record. Only the home organization that created this record can modify it.`,
268268
);
269269
}
270270

@@ -276,7 +276,7 @@ class StagingV2 extends Model {
276276

277277
if (!homeOrg || nonHomeOrgUid) {
278278
throw new Error(
279-
`Restricted data: cannot modify this ${table} record with orgUid '${nonHomeOrgUid}'. Only the home organization can modify this record.`,
279+
`Restricted data: cannot modify this ${table} record with orgUid '${nonHomeOrgUid}'. Only the home organization that created this record can modify it.`,
280280
);
281281
}
282282
}
@@ -328,7 +328,7 @@ class StagingV2 extends Model {
328328
);
329329
if (!existingRecord && !payloadHasOwnershipFields) {
330330
throw new Error(
331-
`Restricted data: cannot determine the owner of this ${values.table} record. Only the home organization can modify this record.`,
331+
`Restricted data: cannot determine the owner of this ${values.table} record. Only the home organization that created this record can modify it.`,
332332
);
333333
}
334334

0 commit comments

Comments
 (0)