Browse Source

fix: error message correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/7120/head
Pranav C 1 year ago
parent
commit
02d09cc767
  1. 30
      packages/nocodb/src/db/BaseModelSqlv2.ts

30
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -4869,7 +4869,9 @@ class BaseModelSqlv2 {
);
NcError.unprocessableEntity(
`Child record with id [${missingIds.join(', ')}] not found`,
`Child record with id [${extractIdsString(
missingIds,
)}] not found`,
);
}
@ -4933,7 +4935,9 @@ class BaseModelSqlv2 {
);
NcError.unprocessableEntity(
`Child record with id [${missingIds.join(', ')}] not found`,
`Child record with id [${extractIdsString(
missingIds,
)}] not found`,
);
}
}
@ -4983,7 +4987,9 @@ class BaseModelSqlv2 {
if (!childRow) {
NcError.unprocessableEntity(
`Child record with id [${childIds[0]}] not found`,
`Child record with id [${extractIdsString(
childIds,
)}] not found`,
);
}
}
@ -5109,7 +5115,9 @@ class BaseModelSqlv2 {
);
NcError.unprocessableEntity(
`Child record with id [${missingIds.join(', ')}] not found`,
`Child record with id [${extractIdsString(
missingIds,
)}] not found`,
);
}
}
@ -5157,7 +5165,9 @@ class BaseModelSqlv2 {
);
NcError.unprocessableEntity(
`Child record with id [${missingIds.join(', ')}] not found`,
`Child record with id [${extractIdsString(
missingIds,
)}] not found`,
);
}
}
@ -5211,7 +5221,9 @@ class BaseModelSqlv2 {
if (!childRow) {
NcError.unprocessableEntity(
`Child record with id [${childIds[0]}] not found`,
`Child record with id [${extractIdsString(
childIds,
)}] not found`,
);
}
}
@ -5677,4 +5689,10 @@ export function getListArgs(
return obj;
}
function extractIdsString(childIds: (string | number | Record<string, any>)[]) {
return childIds
.map((r) => (typeof r === 'object' ? JSON.stringify(r) : r))
.join(', ');
}
export { BaseModelSqlv2 };

Loading…
Cancel
Save