@jini-ai/http-kit 0.6.19 → 0.6.22

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,5 +1,9 @@
1
1
  # @jini-ai/http-kit
2
2
 
3
+ ## 0.6.22
4
+
5
+ - The internal error response says in plain words what happened instead of "an internal error occurred".
6
+
3
7
  ## 0.6.19
4
8
 
5
9
  - Tests: the route adapter's app fixture is a real `express()` app typed as `Express`, replacing the `app as any` casts.
package/dist/adapter.js CHANGED
@@ -165,6 +165,6 @@ function sendRouteException({ res, spec, adapter, error: e }, _optional = {}) {
165
165
  const correlationId = randomUUID();
166
166
  const sink = adapter?.onInternalError ?? defaultInternalErrorSink;
167
167
  sink({ method: spec.method, path: spec.path, correlationId, error: e });
168
- sendApiError({ res, status: 500, error: createApiError({ code: 'INTERNAL_ERROR', message: 'an internal error occurred' }, { requestId: correlationId }) });
168
+ sendApiError({ res, status: 500, error: createApiError({ code: 'INTERNAL_ERROR', message: 'The server could not finish this request. Check whether your change was saved, then copy the request ID and report this problem.' }, { requestId: correlationId }) });
169
169
  }
170
170
  //# sourceMappingURL=adapter.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jini-ai/http-kit",
3
- "version": "0.6.19",
3
+ "version": "0.6.22",
4
4
  "description": "Generic Express transport primitives, request parsing, response serialization, origin guards and route-pack mounting.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -71,14 +71,14 @@
71
71
  "@types/express": "^4.17.21",
72
72
  "@vitest/coverage-v8": "^2.1.9",
73
73
  "express": "^4.21.0",
74
- "@jini-ai/platform": "0.6.19",
75
- "@jini-ai/protocol": "0.6.19",
76
- "@jini-ai/core": "0.6.19"
74
+ "@jini-ai/platform": "0.6.22",
75
+ "@jini-ai/core": "0.6.22",
76
+ "@jini-ai/protocol": "0.6.19"
77
77
  },
78
78
  "dependencies": {
79
- "@jini-ai/protocol": "^0.6.19",
80
- "@jini-ai/platform": "^0.6.19",
81
- "@jini-ai/core": "^0.6.19"
79
+ "@jini-ai/core": "^0.6.22",
80
+ "@jini-ai/platform": "^0.6.22",
81
+ "@jini-ai/protocol": "^0.6.19"
82
82
  },
83
83
  "scripts": {
84
84
  "build": "tsc -p tsconfig.json",