Browse Source

refactor(api): provide more meaningful error message

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3470/head
Pranav C 2 years ago
parent
commit
6afb380af4
  1. 9
      packages/nocodb/src/lib/meta/helpers/NcPluginMgrv2.ts

9
packages/nocodb/src/lib/meta/helpers/NcPluginMgrv2.ts

@ -242,7 +242,8 @@ class NcPluginMgrv2 {
const tempPlugin = new plugin.builder(Noco.ncMeta, plugin);
await tempPlugin.init(args?.input);
if (!tempPlugin?.getAdapter()?.test) NcError.notImplemented();
if (!tempPlugin?.getAdapter()?.test)
NcError.notImplemented('Plugin test is not implemented');
return tempPlugin?.getAdapter()?.test?.();
}
@ -255,7 +256,8 @@ class NcPluginMgrv2 {
const tempPlugin = new plugin.builder(Noco.ncMeta, plugin);
await tempPlugin.init(args?.input);
if (!tempPlugin?.getAdapter()?.test) NcError.notImplemented();
if (!tempPlugin?.getAdapter()?.test)
NcError.notImplemented('Plugin test is not implemented');
return tempPlugin?.getAdapter()?.test?.();
}
@ -267,7 +269,8 @@ class NcPluginMgrv2 {
const tempPlugin = new plugin.builder(Noco.ncMeta, plugin);
await tempPlugin.init(args?.input);
if (!tempPlugin?.getAdapter()?.test) NcError.notImplemented();
if (!tempPlugin?.getAdapter()?.test)
NcError.notImplemented('Plugin test is not implemented');
return tempPlugin?.getAdapter()?.test?.();
}

Loading…
Cancel
Save