@medusajs/framework 2.8.8-snapshot-20250715104109 → 2.8.8-snapshot-20250715180446
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 +1 @@
|
|
1
|
-
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/error-handler.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAA0B,MAAM,SAAS,CAAA;AAerE,wBAAgB,YAAY,IAoFV,mBAAmB,CACpC;AAED;;;;;;;;;;;;;;;;;GAiBG"}
|
@@ -19,7 +19,6 @@ function errorHandler() {
|
|
19
19
|
logger.error("req.scope is missing unexpectedly. It should be defined in all the cases");
|
20
20
|
}
|
21
21
|
err = (0, exception_formatter_1.formatException)(err);
|
22
|
-
logger.error(err);
|
23
22
|
const errorType = err.type || err.name;
|
24
23
|
const errObj = {
|
25
24
|
code: err.code,
|
@@ -67,6 +66,12 @@ function errorHandler() {
|
|
67
66
|
errObj.type = "unknown_error";
|
68
67
|
break;
|
69
68
|
}
|
69
|
+
if (statusCode >= 500) {
|
70
|
+
logger.error(err);
|
71
|
+
}
|
72
|
+
else {
|
73
|
+
logger.info(err.message);
|
74
|
+
}
|
70
75
|
if ("issues" in err && Array.isArray(err.issues)) {
|
71
76
|
const messages = err.issues.map((issue) => (0, zod_validation_error_1.fromZodIssue)(issue).toString());
|
72
77
|
res.status(statusCode).json({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../../src/http/middlewares/error-handler.ts"],"names":[],"mappings":";;AAeA,
|
1
|
+
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../../src/http/middlewares/error-handler.ts"],"names":[],"mappings":";;AAeA,oCAqFC;AAnGD,+DAAmD;AAEnD,2CAAwE;AAEx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AG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,mCAAY,EAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;YAC1E,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;gBAC1B,IAAI,EAAE,mBAAW,CAAC,KAAK,CAAC,YAAY;gBACpC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;aAC7B,CAAC,CAAA;YACF,OAAM;QACR,CAAC;QAED,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACrC,CAAmC,CAAA;AACrC,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/framework",
|
3
|
-
"version": "2.8.8-snapshot-
|
3
|
+
"version": "2.8.8-snapshot-20250715180446",
|
4
4
|
"description": "Framework",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -55,7 +55,7 @@
|
|
55
55
|
},
|
56
56
|
"devDependencies": {
|
57
57
|
"@aws-sdk/client-dynamodb": "^3.218.0",
|
58
|
-
"@medusajs/cli": "2.8.8-snapshot-
|
58
|
+
"@medusajs/cli": "2.8.8-snapshot-20250715180446",
|
59
59
|
"@mikro-orm/core": "6.4.3",
|
60
60
|
"@mikro-orm/knex": "6.4.3",
|
61
61
|
"@mikro-orm/migrations": "6.4.3",
|
@@ -76,12 +76,12 @@
|
|
76
76
|
},
|
77
77
|
"dependencies": {
|
78
78
|
"@jercle/yargonaut": "^1.1.5",
|
79
|
-
"@medusajs/modules-sdk": "2.8.8-snapshot-
|
80
|
-
"@medusajs/orchestration": "2.8.8-snapshot-
|
81
|
-
"@medusajs/telemetry": "2.8.8-snapshot-
|
82
|
-
"@medusajs/types": "2.8.8-snapshot-
|
83
|
-
"@medusajs/utils": "2.8.8-snapshot-
|
84
|
-
"@medusajs/workflows-sdk": "2.8.8-snapshot-
|
79
|
+
"@medusajs/modules-sdk": "2.8.8-snapshot-20250715180446",
|
80
|
+
"@medusajs/orchestration": "2.8.8-snapshot-20250715180446",
|
81
|
+
"@medusajs/telemetry": "2.8.8-snapshot-20250715180446",
|
82
|
+
"@medusajs/types": "2.8.8-snapshot-20250715180446",
|
83
|
+
"@medusajs/utils": "2.8.8-snapshot-20250715180446",
|
84
|
+
"@medusajs/workflows-sdk": "2.8.8-snapshot-20250715180446",
|
85
85
|
"@opentelemetry/api": "^1.9.0",
|
86
86
|
"@types/express": "^4.17.17",
|
87
87
|
"chokidar": "^3.4.2",
|
@@ -102,7 +102,7 @@
|
|
102
102
|
},
|
103
103
|
"peerDependencies": {
|
104
104
|
"@aws-sdk/client-dynamodb": "^3.218.0",
|
105
|
-
"@medusajs/cli": "2.8.8-snapshot-
|
105
|
+
"@medusajs/cli": "2.8.8-snapshot-20250715180446",
|
106
106
|
"@mikro-orm/cli": "6.4.3",
|
107
107
|
"@mikro-orm/core": "6.4.3",
|
108
108
|
"@mikro-orm/knex": "6.4.3",
|