silgi 0.10.7 → 0.10.8

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.
@@ -1,4 +1,4 @@
1
- const version = "0.10.7";
1
+ const version = "0.10.8";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,4 +1,4 @@
1
- const version = "0.10.7";
1
+ const version = "0.10.8";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,4 +1,4 @@
1
- const version = "0.10.7";
1
+ const version = "0.10.8";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,3 +1,4 @@
1
+ import { consola } from "consola";
1
2
  import { createError, defineEventHandler, getQuery, H3Error, readBody } from "h3";
2
3
  import { silgi, SilgiError, useSilgi } from "silgi/core";
3
4
  export default async function addNitroApp(silgiCtx = useSilgi()) {
@@ -22,13 +23,7 @@ export default async function addNitroApp(silgiCtx = useSilgi()) {
22
23
  }
23
24
  } catch (error) {
24
25
  if (error instanceof H3Error) {
25
- throw createError({
26
- statusCode: error.statusCode,
27
- message: error.message,
28
- data: error.data
29
- // unhandled: false,
30
- // fatal: false,
31
- });
26
+ throw error;
32
27
  }
33
28
  if (SilgiError.isError(error)) {
34
29
  throw createError({
@@ -42,6 +37,11 @@ export default async function addNitroApp(silgiCtx = useSilgi()) {
42
37
  }
43
38
  });
44
39
  }
40
+ consola.withTag("silgi/nitro/srn").error(error);
41
+ throw createError({
42
+ statusCode: 500,
43
+ message: "Internal Server Error"
44
+ });
45
45
  }
46
46
  }));
47
47
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.10.7",
4
+ "version": "0.10.8",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {