From c83339029c418895b6605037f8832ddc2c8cfbfa Mon Sep 17 00:00:00 2001 From: Fraser Savage Date: Fri, 9 Aug 2024 15:45:38 +0100 Subject: [PATCH 1/3] fix(write-api): Update Cloud Serverless outside-retention failure to HTTP 422 --- api-docs/cloud-serverless/v2/ref.yml | 7 +++++++ .../influxdb/cloud-serverless/write-data/troubleshoot.md | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/api-docs/cloud-serverless/v2/ref.yml b/api-docs/cloud-serverless/v2/ref.yml index 47cb51516..2cc273595 100644 --- a/api-docs/cloud-serverless/v2/ref.yml +++ b/api-docs/cloud-serverless/v2/ref.yml @@ -7705,6 +7705,13 @@ paths: InfluxDB rejected the batch and did not write any data. InfluxDB returns this error if the payload exceeds the 50MB size limit. + '422': + description: | + Unprocessable Entity. + + The request contained data outside the bucket's retention window, causing InfluxDB to reject the batch and write no data. + + The response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points). '429': description: | Too many requests. diff --git a/content/influxdb/cloud-serverless/write-data/troubleshoot.md b/content/influxdb/cloud-serverless/write-data/troubleshoot.md index de9ab7dc3..dd85c6a9b 100644 --- a/content/influxdb/cloud-serverless/write-data/troubleshoot.md +++ b/content/influxdb/cloud-serverless/write-data/troubleshoot.md @@ -55,9 +55,9 @@ The `message` property of the response body may contain additional details about | `204 "No Content"` | no response body | If InfluxDB ingested all of the data in the batch | | `400 "Bad request"` | `line` contains the first malformed line, `message` describes rejected points | If request data is malformed | | `401 "Unauthorized"` | | If the `Authorization` header is missing or malformed or if the [token](/influxdb/cloud-serverless/admin/tokens/) doesn't have [permission](/influxdb/cloud-serverless/admin/tokens/create-token/) to write to the bucket. See [examples using credentials](/influxdb/cloud-serverless/get-started/write/#write-line-protocol-to-influxdb) in write requests. | -| `403 "Forbidden"` | `message` contains details about the error | If the data isn't allowed (for example, falls outside of the bucket's retention period). | `404 "Not found"` | requested **resource type** (for example, "organization" or "bucket"), and **resource name** | If a requested resource (for example, organization or bucket) wasn't found | | `413 “Request too large”` | cannot read data: points in batch is too large | If a request exceeds the maximum [global limit](/influxdb/cloud-serverless/admin/billing/limits/) | +| `422 "Unprocessable Entity"` | `message` contains details about the error | If the data isn't allowed (for example, falls outside of the bucket's retention period). | `429 “Too many requests”` | | If the number of requests exceeds the [adjustable service quota](/influxdb/cloud-serverless/admin/billing/limits/#adjustable-service-quotas). The `Retry-After` header contains the number of seconds to wait before trying the write again. | If a request exceeds your plan's [adjustable service quotas](/influxdb/cloud-serverless/admin/billing/limits/#adjustable-service-quotas) | `500 "Internal server error"` | | Default status for an error | | `503 "Service unavailable"` | | If the server is temporarily unavailable to accept writes. The `Retry-After` header contains the number of seconds to wait before trying the write again. From 749c59b52579b0795357fe9173f44ee50936ddd0 Mon Sep 17 00:00:00 2001 From: Fraser Savage Date: Fri, 9 Aug 2024 15:51:18 +0100 Subject: [PATCH 2/3] fix(write-api): Update Cloud Dedicated outside-retention failure to HTTP 422 --- api-docs/cloud-dedicated/v2/ref.yml | 7 +++++++ .../influxdb/cloud-dedicated/write-data/troubleshoot.md | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api-docs/cloud-dedicated/v2/ref.yml b/api-docs/cloud-dedicated/v2/ref.yml index 21cfdea6e..941e27a13 100644 --- a/api-docs/cloud-dedicated/v2/ref.yml +++ b/api-docs/cloud-dedicated/v2/ref.yml @@ -703,6 +703,13 @@ paths: schema: $ref: '#/components/schemas/LineProtocolLengthError' description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written. + '422': + description: | + Unprocessable Entity. + + The request contained data outside the bucket's retention window, causing InfluxDB to reject the batch and write no data. + + The response body contains details about the [rejected points](/influxdb/cloud-dedicated/write-data/troubleshoot/#troubleshoot-rejected-points). '429': description: Token is temporarily over quota. The Retry-After header describes when to try the write again. headers: diff --git a/content/influxdb/cloud-dedicated/write-data/troubleshoot.md b/content/influxdb/cloud-dedicated/write-data/troubleshoot.md index a18054c86..0650edfbc 100644 --- a/content/influxdb/cloud-dedicated/write-data/troubleshoot.md +++ b/content/influxdb/cloud-dedicated/write-data/troubleshoot.md @@ -56,8 +56,9 @@ The `message` property of the response body may contain additional details about | `400 "Bad request"` | error details about rejected points, up to 100 points: `line` contains the first rejected line, `message` describes rejections line | If request data is malformed | | `401 "Unauthorized"` | | If the `Authorization` header is missing or malformed or if the [token](/influxdb/cloud-dedicated/admin/tokens/) doesn't have [permission](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/#examples) to write to the database. See [examples using credentials](/influxdb/cloud-dedicated/get-started/write/#write-line-protocol-to-influxdb) in write requests. | | `404 "Not found"` | requested **resource type** (for example, "organization" or "database"), and **resource name** | If a requested resource (for example, organization or database) wasn't found | +| `422 "Unprocessable Entity"` | `message` contains details about the error | If the data isn't allowed (for example, falls outside of the bucket's retention period). | `500 "Internal server error"` | | Default status for an error | -| `503 "Service unavailable"` | | If the server is temporarily unavailable to accept writes. The `Retry-After` header contains the number of seconds to wait before trying the write again. +| `503 "Service unavailable"` | | If the server is temporarily unavailable to accept writes. The `Retry-After` header contains the number of seconds to wait before trying the write again. The `message` property of the response body may contain additional details about the error. If your data did not write to the database, see how to [troubleshoot rejected points](#troubleshoot-rejected-points). From 57eb8c6aa4edec70400f0c6cb807269b8c9cf2f9 Mon Sep 17 00:00:00 2001 From: Fraser Savage Date: Fri, 9 Aug 2024 16:17:43 +0100 Subject: [PATCH 3/3] refactor(write-api): Use proper product terms for Dedicated Co-authored-by: Scott Anderson --- api-docs/cloud-dedicated/v2/ref.yml | 2 +- api-docs/cloud-serverless/v2/ref.yml | 2 +- content/influxdb/cloud-dedicated/write-data/troubleshoot.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api-docs/cloud-dedicated/v2/ref.yml b/api-docs/cloud-dedicated/v2/ref.yml index 941e27a13..ddaf7fc7e 100644 --- a/api-docs/cloud-dedicated/v2/ref.yml +++ b/api-docs/cloud-dedicated/v2/ref.yml @@ -707,7 +707,7 @@ paths: description: | Unprocessable Entity. - The request contained data outside the bucket's retention window, causing InfluxDB to reject the batch and write no data. + The request contained data outside the database’s retention period. InfluxDB rejected the batch and wrote no data. The response body contains details about the [rejected points](/influxdb/cloud-dedicated/write-data/troubleshoot/#troubleshoot-rejected-points). '429': diff --git a/api-docs/cloud-serverless/v2/ref.yml b/api-docs/cloud-serverless/v2/ref.yml index 2cc273595..d6047bc77 100644 --- a/api-docs/cloud-serverless/v2/ref.yml +++ b/api-docs/cloud-serverless/v2/ref.yml @@ -7709,7 +7709,7 @@ paths: description: | Unprocessable Entity. - The request contained data outside the bucket's retention window, causing InfluxDB to reject the batch and write no data. + The request contained data outside the bucket's retention period. InfluxDB rejected the batch and wrote no data. The response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points). '429': diff --git a/content/influxdb/cloud-dedicated/write-data/troubleshoot.md b/content/influxdb/cloud-dedicated/write-data/troubleshoot.md index 0650edfbc..97720907d 100644 --- a/content/influxdb/cloud-dedicated/write-data/troubleshoot.md +++ b/content/influxdb/cloud-dedicated/write-data/troubleshoot.md @@ -56,7 +56,7 @@ The `message` property of the response body may contain additional details about | `400 "Bad request"` | error details about rejected points, up to 100 points: `line` contains the first rejected line, `message` describes rejections line | If request data is malformed | | `401 "Unauthorized"` | | If the `Authorization` header is missing or malformed or if the [token](/influxdb/cloud-dedicated/admin/tokens/) doesn't have [permission](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/#examples) to write to the database. See [examples using credentials](/influxdb/cloud-dedicated/get-started/write/#write-line-protocol-to-influxdb) in write requests. | | `404 "Not found"` | requested **resource type** (for example, "organization" or "database"), and **resource name** | If a requested resource (for example, organization or database) wasn't found | -| `422 "Unprocessable Entity"` | `message` contains details about the error | If the data isn't allowed (for example, falls outside of the bucket's retention period). +| `422 "Unprocessable Entity"` | `message` contains details about the error | If the data isn't allowed (for example, falls outside of the database’s retention period). | `500 "Internal server error"` | | Default status for an error | | `503 "Service unavailable"` | | If the server is temporarily unavailable to accept writes. The `Retry-After` header contains the number of seconds to wait before trying the write again.