Closed sajith closed 6 months ago
What should getconnection_by_id() do when the requested item is not in the database?
getconnection_by_id()
https://github.com/atlanticwave-sdx/sdx-controller/blob/98fe1ce51070415b3d97b39b55a664345c86bb35/swagger_server/controllers/connection_controller.py#L76-L87
As a result of the above implementation, currently it returns nothing (or None), which results in a HTTP "204 No Content" response code when you do a GET /connection/{connection_id}. The correct-er response should be "404 Not Found".
None
GET /connection/{connection_id}
What should
getconnection_by_id()
do when the requested item is not in the database?https://github.com/atlanticwave-sdx/sdx-controller/blob/98fe1ce51070415b3d97b39b55a664345c86bb35/swagger_server/controllers/connection_controller.py#L76-L87
As a result of the above implementation, currently it returns nothing (or
None
), which results in a HTTP "204 No Content" response code when you do aGET /connection/{connection_id}
. The correct-er response should be "404 Not Found".