kuzzle 2.19.6 → 2.19.7
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.
|
@@ -69,7 +69,7 @@ export declare class EmbeddedSDK extends Kuzzle {
|
|
|
69
69
|
* @param request - API request (https://docs.kuzzle.io/core/2/guides/main-concepts/1-api#other-protocols)
|
|
70
70
|
* @param options - Optional arguments
|
|
71
71
|
*/
|
|
72
|
-
query<TRequest extends BaseRequest, TResult>(request: TRequest, options?: {
|
|
72
|
+
query<TRequest extends BaseRequest = BaseRequest, TResult extends JSONObject = JSONObject>(request: TRequest, options?: {
|
|
73
73
|
propagate?: boolean;
|
|
74
74
|
}): Promise<ResponsePayload<TResult>>;
|
|
75
75
|
}
|
package/lib/kerror/index.js
CHANGED
|
@@ -169,7 +169,7 @@ function rawGetFrom(domains, source, domain, subdomain, error, ...placeholders)
|
|
|
169
169
|
const derivedError = rawGet(domains, domain, subdomain, error, ...placeholders);
|
|
170
170
|
// If a stacktrace is present, we need to modify the first line because it
|
|
171
171
|
// still contains the original error message
|
|
172
|
-
if (derivedError.stack && derivedError.stack.length) {
|
|
172
|
+
if (derivedError.stack && derivedError.stack.length && source.stack) {
|
|
173
173
|
const stackArray = source.stack.split("\n");
|
|
174
174
|
stackArray.shift();
|
|
175
175
|
derivedError.stack = [
|
|
@@ -232,6 +232,10 @@ class ESWrapper {
|
|
|
232
232
|
_handleNotFoundError(error, message) {
|
|
233
233
|
let errorMessage = message;
|
|
234
234
|
|
|
235
|
+
if (!error.body._index) {
|
|
236
|
+
return kerror.get("unexpected_not_found", errorMessage);
|
|
237
|
+
}
|
|
238
|
+
|
|
235
239
|
// _index= "&nyc-open-data.yellow-taxi"
|
|
236
240
|
const index = error.body._index.split(".")[0].slice(1);
|
|
237
241
|
const collection = error.body._index.split(".")[1];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kuzzle",
|
|
3
3
|
"author": "The Kuzzle Team <support@kuzzle.io>",
|
|
4
|
-
"version": "2.19.
|
|
4
|
+
"version": "2.19.7",
|
|
5
5
|
"description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
|
|
6
6
|
"bin": "bin/start-kuzzle-server",
|
|
7
7
|
"scripts": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"test:functional:legacy:mqtt": "npx cucumber-js --format progress-bar --profile mqtt ./features-legacy",
|
|
27
27
|
"cucumber": "cucumber.js --fail-fast",
|
|
28
28
|
"codecov": "codecov",
|
|
29
|
+
"prettier": "npx prettier ./lib ./test ./bin ./features ./plugins/available/functional-test-plugin --write",
|
|
29
30
|
"test:lint": "npm run test:lint:js && npm run test:lint:ts",
|
|
30
31
|
"test:lint:ts": "eslint --max-warnings=0 ./lib --ext .ts --config .eslintc-ts.json",
|
|
31
32
|
"test:lint:ts:fix": "eslint --max-warnings=0 --fix ./lib --ext .ts --config .eslintc-ts.json",
|