Skip to content

Commit

Permalink
[CCI] fix: pass required data argument to SerializationError class (#…
Browse files Browse the repository at this point in the history
…419)

* feat: overload constructor to SerializationError class

Signed-off-by: Timur Bolotov <bolotovtmr@gmail.com>
  • Loading branch information
timursaurus committed Mar 9, 2023
1 parent 66c3a99 commit 74688cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Documented all API methods ([#335](https://github.com/opensearch-project/opensearch-js/issues/335))
- Added point in time APIs ([#348](https://github.com/opensearch-project/opensearch-js/pull/348))
- Added support for Amazon OpenSearch Serverless ([#356](https://github.com/opensearch-project/opensearch-js/issues/356))
- Added required `array` argument when invoking `SerializationError` ([#419](https://github.com/opensearch-project/opensearch-js/pull/419))
- Removed unnecessary `data` argument when invoking `OpenSearchClientError` ([#421](https://github.com/opensearch-project/opensearch-js/pull/421))

### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion lib/Serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Serializer {
ndserialize(array) {
debug('ndserialize', array);
if (Array.isArray(array) === false) {
throw new SerializationError('The argument provided is not an array');
throw new SerializationError('The argument provided is not an array', array);
}
let ndjson = '';
for (let i = 0, len = array.length; i < len; i++) {
Expand Down

0 comments on commit 74688cc

Please sign in to comment.