diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2ecfbd7..77fd81433 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,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)) +- Removed unnecessary `data` argument when invoking `OpenSearchClientError` ([#421](https://github.com/opensearch-project/opensearch-js/pull/421)) ### Dependencies - Bumps `xmlbuilder2` from 2.4.1 to 3.0.2 diff --git a/lib/errors.js b/lib/errors.js index a8e63e77d..82bedd709 100644 --- a/lib/errors.js +++ b/lib/errors.js @@ -70,7 +70,7 @@ class NoLivingConnectionsError extends OpenSearchClientError { class SerializationError extends OpenSearchClientError { constructor(message, data) { - super(message, data); + super(message); Error.captureStackTrace(this, SerializationError); this.name = 'SerializationError'; this.message = message || 'Serialization Error'; @@ -80,7 +80,7 @@ class SerializationError extends OpenSearchClientError { class DeserializationError extends OpenSearchClientError { constructor(message, data) { - super(message, data); + super(message); Error.captureStackTrace(this, DeserializationError); this.name = 'DeserializationError'; this.message = message || 'Deserialization Error';