-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP status code 500 when image over allowance for thumbnails #10589
Comments
Hm 413 Content Too Large does not really apply:
I see three other status codes that we could use: 415 Unsupported Media Type
AFAICT the problem is with the target resource and the server does not need to send Accept-Encoding or Accept headers as there is no MUST in the description and the server is allowed to inspect the data directly. 422 Unprocessable Content
Still, the real problem is not with the Request. The client did everything correct. 403 Forbidden
I think this is the simplest solution and highlighted the relevant part of the description. It is simply forbidden to fetch thumbnails for images that are too large. We can even describe the reason in the response. So, I'd vote for 403 Forbidden as we cannot send the actual reason in a 415 response. |
Return 403 instead of 500 when the image is too large (in dimensions or file size). Fixes: owncloud#10589
Return 403 instead of 500 when the image is too large (in dimensions or file size). Fixes: owncloud#10589
Return 403 instead of 500 when the image is too large (in dimensions or file size). Fixes: #10589
Describe the bug
The HTTP status code 500 looks wrong to me when
Steps to reproduce
Expected behavior
have an HTTP status code that tells the clients, that their payload can't be processed, eg.
HTTP 413 Payload Too Large
Actual behavior
we have an status code
HTTP 500 Internal Server Error
which says that the administrator of the server needs to take investigations and fix the service. This is just not true in this caseSetup
oCIS 7.0.0-rc.2 in Kubernetes via the oCIS Helm Chart
Additional context
This prevents monitoring for HTTP 5xx status codes that are not to be expected to happen in regular cases.
The text was updated successfully, but these errors were encountered: