Skip to content

Commit 6944b6f

Browse files
Merge pull request #5564 from influxdata/savage/update-response-code
fix(write-api): Write requests outside retention period will return 422
2 parents 4e5a87c + 57eb8c6 commit 6944b6f

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

api-docs/cloud-dedicated/v2/ref.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,13 @@ paths:
703703
schema:
704704
$ref: '#/components/schemas/LineProtocolLengthError'
705705
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.
706+
'422':
707+
description: |
708+
Unprocessable Entity.
709+
710+
The request contained data outside the database’s retention period. InfluxDB rejected the batch and wrote no data.
711+
712+
The response body contains details about the [rejected points](/influxdb/cloud-dedicated/write-data/troubleshoot/#troubleshoot-rejected-points).
706713
'429':
707714
description: Token is temporarily over quota. The Retry-After header describes when to try the write again.
708715
headers:

api-docs/cloud-serverless/v2/ref.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7705,6 +7705,13 @@ paths:
77057705
InfluxDB rejected the batch and did not write any data.
77067706
77077707
InfluxDB returns this error if the payload exceeds the 50MB size limit.
7708+
'422':
7709+
description: |
7710+
Unprocessable Entity.
7711+
7712+
The request contained data outside the bucket's retention period. InfluxDB rejected the batch and wrote no data.
7713+
7714+
The response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points).
77087715
'429':
77097716
description: |
77107717
Too many requests.

content/influxdb/cloud-dedicated/write-data/troubleshoot.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ The `message` property of the response body may contain additional details about
5656
| `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 |
5757
| `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. |
5858
| `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 |
59+
| `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).
5960
| `500 "Internal server error"` | | Default status for an error |
60-
| `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.
61+
| `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.
6162

6263
The `message` property of the response body may contain additional details about the error.
6364
If your data did not write to the database, see how to [troubleshoot rejected points](#troubleshoot-rejected-points).

content/influxdb/cloud-serverless/write-data/troubleshoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ The `message` property of the response body may contain additional details about
5555
| `204 "No Content"` | no response body | If InfluxDB ingested all of the data in the batch |
5656
| `400 "Bad request"` | `line` contains the first malformed line, `message` describes rejected points | If request data is malformed |
5757
| `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. |
58-
| `403 "Forbidden"` | `message` contains details about the error | If the data isn't allowed (for example, falls outside of the bucket's retention period).
5958
| `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 |
6059
| `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/) |
60+
| `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).
6161
| `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)
6262
| `500 "Internal server error"` | | Default status for an error |
6363
| `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.

0 commit comments

Comments
 (0)