Browse Source

refactor: update internalServerError messages

pull/5444/head
Wing-Kam Wong 2 years ago
parent
commit
7d78a1899f
  1. 8
      packages/nocodb-nest/src/services/datas.service.ts
  2. 7
      packages/nocodb-nest/src/services/public-datas.service.ts
  3. 4
      packages/nocodb-nest/src/services/utils.service.ts

8
packages/nocodb-nest/src/services/datas.service.ts

@ -143,9 +143,7 @@ export class DatasService {
count = await baseModel.count(listArgs);
} catch (e) {
console.log(e);
NcError.internalServerError(
'Internal Server Error, check server log for more details',
);
NcError.internalServerError('Please check server log for more details');
}
return new PagedResponseImpl(data, {
@ -641,9 +639,7 @@ export class DatasService {
);
} catch (e) {
console.log(e);
NcError.internalServerError(
'Internal Server Error, check server log for more details',
);
NcError.internalServerError('Please check server log for more details');
}
}

7
packages/nocodb-nest/src/services/public-datas.service.ts

@ -82,10 +82,7 @@ export class PublicDatasService {
count = await baseModel.count(listArgs);
} catch (e) {
console.log(e);
// show empty result instead of throwing error here
// e.g. search some text in a numeric field
NcError.internalServerError('Please try after some time');
NcError.internalServerError('Please check server log for more details');
}
return new PagedResponseImpl(data, { ...param.query, count });
@ -185,7 +182,7 @@ export class PublicDatasService {
});
} catch (e) {
console.log(e);
NcError.internalServerError('Internal Server Error');
NcError.internalServerError('Please check server log for more details');
}
return data;
}

4
packages/nocodb-nest/src/services/utils.service.ts

@ -189,7 +189,9 @@ export class UtilsService {
const connectionConfig = NcConfigFactory.extractXcUrlFromJdbc(url, true);
return connectionConfig;
} catch (error) {
return NcError.internalServerError();
return NcError.internalServerError(
'Please check server log for more details',
);
}
}

Loading…
Cancel
Save