Browse Source

refactor: better error message

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5901/head
Pranav C 1 year ago
parent
commit
549d22bada
  1. 4
      packages/nocodb/src/services/data-table.service.ts

4
packages/nocodb/src/services/data-table.service.ts

@ -158,7 +158,7 @@ export class DataTableService {
const model = await Model.get(param.modelId);
if (!model) {
NcError.notFound('Model not found');
NcError.notFound(`Table '${param.modelId}' not found`);
}
if (param.projectId && model.project_id !== param.projectId) {
@ -170,7 +170,7 @@ export class DataTableService {
if (param.viewId) {
view = await View.get(param.viewId);
if (!view || (view.fk_model_id && view.fk_model_id !== param.modelId)) {
NcError.unprocessableEntity('View not belong to model');
NcError.unprocessableEntity(`View '${param.viewId}' not found`);
}
}

Loading…
Cancel
Save