@pxp-nd/core 1.2.76 → 1.2.78
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.
|
@@ -292,6 +292,10 @@ class Controller {
|
|
|
292
292
|
}
|
|
293
293
|
return t;
|
|
294
294
|
}, {});
|
|
295
|
+
//allow some params that start with __
|
|
296
|
+
Object.keys(params).filter((key) => key.startsWith('__')).forEach((keyFiltered) => {
|
|
297
|
+
ownColumnsForSchema = Object.assign(Object.assign({}, ownColumnsForSchema), { [keyFiltered]: joi_1.default.string() });
|
|
298
|
+
});
|
|
295
299
|
const schema = this.getListSchema(ownColumnsForSchema);
|
|
296
300
|
const resParams = await index_1.__(this.schemaValidate(schema, params));
|
|
297
301
|
const listParam = this.getListParams(resParams, whereOwnColumns);
|
package/dist/lib/pxp/PxpError.js
CHANGED
|
@@ -50,14 +50,13 @@ const errorMiddleware = (err, req, res) => {
|
|
|
50
50
|
const { statusCode, message, stack, tecMessage, errorObject } = err;
|
|
51
51
|
const extraObj = process.env.NODE_ENV === "production"
|
|
52
52
|
? {}
|
|
53
|
-
: { extendedMessage: tecMessage, stack };
|
|
53
|
+
: { extendedMessage: tecMessage, stack, errorObject };
|
|
54
54
|
// @todo if production not show tecMessage and stack
|
|
55
55
|
return res.status(err.statusCode || 500).json({
|
|
56
56
|
error: Object.assign({
|
|
57
57
|
code: statusCode,
|
|
58
58
|
message,
|
|
59
59
|
logId: res.logId ? res.logId : undefined,
|
|
60
|
-
errorObject,
|
|
61
60
|
}, extraObj),
|
|
62
61
|
});
|
|
63
62
|
};
|