Skip to content

Commit 0df31ca

Browse files
feat(develop-docs): Follow up on HTTP 413 (#15915)
SDKs should count client reports for 413.
1 parent 314201d commit 0df31ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

develop-docs/sdk/expected-features/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ When SDKs receive an `HTTP 2xx` status code response from Sentry, they **MUST**
256256
If Sentry returns an `HTTP 4xx` or `HTTP 5xx` status code, SDKs:
257257

258258
- **MUST** discard the envelope
259-
- **MUST** record a [client report](/sdk/telemetry/client-reports) with the discard reason `send_error`, except for `HTTP 413` and `HTTP 429` responses, see below.
259+
- **MUST** record a [client report](/sdk/telemetry/client-reports) with the discard reason `send_error`, except for an `HTTP 429` response, see below.
260260

261261
For an [`HTTP 413 Content Too Large`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413) response, SDKs:
262262

263-
* **MUST** discard the envelope, but **MUST NOT** record a [client report](/sdk/telemetry/client-reports), because the upstream already does this. Doing this would double-count client reports for discarded envelopes.
263+
* **MUST** discard the envelope and record a [client report](/sdk/telemetry/client-reports) with the discard reason `send_error`. Upstream usually records a [client report](/sdk/telemetry/client-reports) for oversized envelopes, but not always. Double-counting is preferable to not counting, so users are aware of all dropped envelopes. Since client reports are not expected to be fully accurate, we accept this tradeoff for now (Jan 7th 2026). In the future, we may add error responses to indicate when SDKs should record a client report.
264264
* **MUST NOT** retry sending the envelope.
265265
* **SHOULD** log an error, informing users that the envelope was discarded due to size limits.
266266
* **MAY** add information from the response body to the logged error. If doing so, SDKs **MUST** be aware that Relay can change or remove information in the response body for an `HTTP 413` at any time without notice.

0 commit comments

Comments
 (0)