@paralect/hive 0.1.30 → 0.1.32

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paralect/hive",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -39,7 +39,14 @@ const main = async () => {
39
39
 
40
40
  qs(app);
41
41
 
42
- app.use(bodyParser({ enableTypes: ["json", "form", "text"] }));
42
+ app.use(bodyParser({
43
+ enableTypes: ["json", "form", "text"],
44
+
45
+ formLimit: '10mb',
46
+ textLimit: '10mb',
47
+ jsonLimit: '10mb',
48
+ }));
49
+
43
50
  app.use(mount("/health", get.handler));
44
51
  app.use(requestLogger());
45
52
 
@@ -147,8 +147,8 @@ export default async (app) => {
147
147
  async ctx => {
148
148
  const result = await handler(ctx);
149
149
 
150
- if (!ctx.body && result) {
151
- ctx.body = result;
150
+ if (!ctx.body) {
151
+ ctx.body = result || { isOk: true };
152
152
  }
153
153
  }
154
154
  );
@@ -4,13 +4,13 @@ const routeErrorHandler = async (ctx, next) => {
4
4
  try {
5
5
  await next();
6
6
  } catch (error) {
7
+ console.log("Route Error", error, error.stack);
8
+
7
9
  const clientError = error.errors;
8
10
  const serverError = { global: error.message };
9
11
 
10
12
  const errors = clientError || serverError;
11
13
 
12
- console.log("Route Error", errors);
13
-
14
14
  logger.error(errors);
15
15
 
16
16
  if (serverError && (error.status === 500 || !error.status) && process.env.APP_ENV === "production") {