Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Return 403 instead of 413 when limit exceeded #1970

Merged
merged 1 commit into from
Mar 22, 2021

Conversation

blami
Copy link
Contributor

@blami blami commented Mar 22, 2021

HTTP response code 413 should be per RFC7231 returned when request
payload is too large and not when request causes dataset too large to process.

HTTP response 403 Forbidden is more appropriate here as it means that
server understood the request, but is refusing to fulfill it.

Closes: #1969

@Dieterbe
Copy link
Contributor

i found 4 hits for http.StatusRequestEntityTooLarge, all seem to be related to checking for this limit, or a similar one.
mind updating all of them?
thanks Ondrej for this 👍

@blami
Copy link
Contributor Author

blami commented Mar 22, 2021

Sure, I will update them all.

HTTP response code 413 should be per RFC7231 returned when request
payload is too large and not when request causes dataset too large to process.

HTTP response 403 Forbidden is more appropriate here as it means that
server understood the request, but is refusing to fulfill it.

Closes: #1969

Signed-off-by: Ondrej Balaz <blami@blami.net>
@Dieterbe Dieterbe merged commit 09fe961 into grafana:master Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graphite API responds with 413 when response is too large not request
3 participants