@dnax/core 0.24.3 → 0.24.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/app/hono.ts +6 -1
  2. package/package.json +1 -1
package/app/hono.ts CHANGED
@@ -164,6 +164,11 @@ function HonoInstance(): typeof app {
164
164
  getPermission(session.get()?.role, tenant_id) ||
165
165
  null;
166
166
 
167
+ if (collection && !col?.slug) {
168
+ c.status(404);
169
+ return c.json({ message: `Collection ${collection} not found` });
170
+ }
171
+
167
172
  let nextLifecyle: any = false;
168
173
 
169
174
  // Middleware for apis
@@ -541,7 +546,7 @@ function HonoInstance(): typeof app {
541
546
  meta: err?.meta || {},
542
547
  };
543
548
  if (Cfg.api?.onError && typeof Cfg.api?.onError == "function") {
544
- await Cfg.api?.onError(errorFormated).catch((err) => {});
549
+ await Cfg.api?.onError(errorFormated).catch((err: any) => {});
545
550
  }
546
551
  return c.json(errorFormated);
547
552
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.24.3",
3
+ "version": "0.24.4",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {