简体   繁体   中英

Openstack Neutron: Cannot find list of possible error response messages for Openstack neutron

I am using OpenStack Neutron to implement Networking capabilities to the virtual machines. I am making a whole web application out of these. So, when the error comes from Open stack neutron when setting a gateway or anything I should be able to show my response message based on the message OpenStack neutron gives.

Actual Question: I need Open stack neutron error responses and their codes so that I can write some mapper to show my own error messages. I tried searching on documentation, repositories. I could not find. Can anyone help me with this

If you are using the REST interface, the error codes are typically the HTTP response codes.

When any code in neutron raises an exception, the neutron API interface maps this internal exception to one of the HTTP error codes and creates an HTTP response with the exception(error) text and sends it back.

HTTP responses codes are classified as: 1xx - Informational response, 2xx Success, 3xx Redirection, 4xx Client errors, 5xx Server errors.

For more details refer to https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

On the neutron interface, one could typically see the following HTTP error response codes:

  • 400 - Bad request. Neutron doesn't like an API parameter.
  • 404 - Not found. The resource identified in the REST interface is not valid.
  • 501 - Not implemented. REST API or operation invoked is not implemented yet or not applicable.
  • 500 - Internal Error. Something unexpected happened inside the neutron.

For the general classification point of view, when a client receives 4xx (400-499) response code, it means that some parameter sent by the client it unexpected. When it receives 5xx (500-599) response code, it means that something went wrong on the server(neutron) side.

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM