Skip to content

Commit 9fa82fd

Browse files
authored
Release 7.8.2: Fix multiple errors error (#681)
`MultipleErrorsError` includes the detailed list of errors returned by Kuzzle in the `errors` property but it was not correctly handled by the SDK
1 parent 0a1e26b commit 9fa82fd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kuzzle-sdk",
3-
"version": "7.8.1",
3+
"version": "7.8.2",
44
"description": "Official Javascript SDK for Kuzzle",
55
"author": "The Kuzzle Team <[email protected]>",
66
"repository": {

src/KuzzleError.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class KuzzleError extends Error {
6969
this.code = apiError.code;
7070

7171
// PartialError
72-
if (this.status === 206) {
72+
if (apiError.errors) {
7373
this.errors = apiError.errors;
7474
this.count = apiError.count;
7575
}

0 commit comments

Comments
 (0)