dcache
dcache copied to clipboard
Quota: WebDAV door returns `500 server error` when quota reached
trafficstars
Dear dCache devs,
This is a minor thingy, but perhaps it's easy to fix.
When quota is reached, WebDAV doors sometimes return a clear error message:
[onno@ui ~]# curl --location --upload-file testfile https://dcachetest.grid.surfsara.nl:2881/users/onno/disk/quota4
Internal problem: REPLICA user quota exceeded for uid=99999
But with curl --fail, the error is quite different and confusing:
[onno@ui ~]# curl --fail --location --upload-file testfile https://dcachetest.grid.surfsara.nl:2881/users/onno/disk/quota
curl: (22) The requested URL returned error: 500 Server Error
The user might think that dCache is broken! Surely we don't want the user to think that? 😉
Wouldn't it be better if WebDAV returned this HTTP code?
507 Insufficient Storage (WebDAV; RFC 4918)
The server is unable to store the representation needed to complete the request.
Another candidate might be "413 Payload Too Large".
Cheers, Onno