diff --git a/CHANGELOG.md b/CHANGELOG.md index 2caaf93f..ff456c8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.35.0 [unreleased] +### Bug Fixes + +1. [#1044](https://github.com/influxdata/influxdb-client-js/pull/1044): Allow 201 status code in a write response. + ## 1.34.0 [2024-07-26] ### Breaking Changes diff --git a/packages/core/src/impl/WriteApiImpl.ts b/packages/core/src/impl/WriteApiImpl.ts index 3dc4b33f..4eca13c7 100644 --- a/packages/core/src/impl/WriteApiImpl.ts +++ b/packages/core/src/impl/WriteApiImpl.ts @@ -236,8 +236,9 @@ export default class WriteApiImpl implements WriteApi { reject(error) }, complete(): void { + // InfluxDB v3 returns 201 for partial success // older implementations of transport do not report status code - if (responseStatusCode == 204 || responseStatusCode == undefined) { + if (responseStatusCode == 204 || responseStatusCode == 201 || responseStatusCode == undefined) { self.writeOptions.writeSuccess.call(self, lines) self.retryStrategy.success() resolve()