@eik/service 2.0.158 → 2.0.159

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.0.159](https://github.com/eik-lib/service/compare/v2.0.158...v2.0.159) (2024-05-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * forward the thrown errorCode and fall back to 500 ([#559](https://github.com/eik-lib/service/issues/559)) ([a8db5e9](https://github.com/eik-lib/service/commit/a8db5e948e1067745f163c77150d434f664548dd))
7
+
1
8
  ## [2.0.158](https://github.com/eik-lib/service/compare/v2.0.157...v2.0.158) (2024-05-13)
2
9
 
3
10
 
package/lib/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { PassThrough } from 'stream';
2
2
  import compression from '@fastify/compress';
3
- import HttpError from 'http-errors';
3
+ import createError from 'http-errors';
4
4
  import pino from 'pino';
5
5
  import cors from '@fastify/cors';
6
6
  import jwt from '@fastify/jwt';
@@ -187,7 +187,7 @@ const EikService = class EikService {
187
187
  reply.send(error);
188
188
  return;
189
189
  }
190
- reply.send(new HttpError.InternalServerError());
190
+ reply.send(createError(error.statusCode || 500));
191
191
  });
192
192
 
193
193
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eik/service",
3
- "version": "2.0.158",
3
+ "version": "2.0.159",
4
4
  "description": "Eik REST API as a standalone HTTP service",
5
5
  "type": "module",
6
6
  "main": "./lib/main.js",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "homepage": "https://github.com/eik-lib/service#readme",
35
35
  "dependencies": {
36
- "@eik/core": "1.3.44",
36
+ "@eik/core": "1.3.45",
37
37
  "convict": "6.2.4",
38
38
  "fastify": "4.26.2",
39
39
  "@fastify/compress": "6.5.0",
@@ -44,7 +44,7 @@
44
44
  "pino": "8.21.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@babel/eslint-parser": "7.23.10",
47
+ "@babel/eslint-parser": "7.24.5",
48
48
  "@semantic-release/changelog": "6.0.3",
49
49
  "@semantic-release/git": "10.0.1",
50
50
  "eslint": "8.57.0",