ExternalGatewayForFloatingIPNotFound returns missleading http status code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
In Progress
|
Low
|
Felix Huettner |
Bug Description
When trying to associate a floating ip with a vm that does not have access to the floating ip network (e.g. there is no router connected) a ExternalGateway
This exception is translated to the client as a http status code "Not Found" (404).
From my perspective this is misleading as the floating ip the call is about has clearly been found.
Rather the request send from the client is invalid as the client needs to issue some other api calls first (or fixing the issue is outside the clients control).
Proposed alternatives (quoted from rfc9110):
* "Bad Request" (400): "[...] indicates that the server cannot or will not process the request due to something that is perceived to be a client error [...]"
* "Unprocessable Entity" (422): "[...] the server understands the content type of the request content, and the syntax of the request content is correct, but it was unable to process the contained instructions. [...]"
While 422 might be more specific we use 400 already in a lot of cases, so i will open a fix for that.
Changed in neutron: | |
importance: | Undecided → Low |
assignee: | nobody → Felix Huettner (felix.huettner) |
Fix proposed to branch: master /review. opendev. org/c/openstack /neutron- lib/+/872748
Review: https:/