HTTP 413 is supposed to mean (per RFC2616) that the request entity was too large. E.g., if you send an enormous body with the request. That is not at all how it is being used in the server resize request example below. The nova/api/openstack/compute/servers.py is coded to return 413 for QuotaError and PortLimitExceeded on create as well as for QuotaError on resize, and there may be other places 413 is being returned inappropriately.
POST /v2/6ce8fae0510349dcbf9b3965f7a20061/servers/8ebaabfc-9018-4ac1-afc6-630aee8a8ae3/action
Request body: { "resize": {
"flavor": {
"vcpus": 1,
"ram": 9999999999,
"disk": 20
}}}
Response: HTTP 413 (Request Entity Too Large)
Response body:
{
overLimit: {
message: "Quota exceeded for ram: Requested 1410063359, but already used 6144 of 8000000 ram"
code: 413
retryAfter: "0"
}
-
}
Which one should be used instead? HTTPBadRequest?