Reputation: 361
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
Upvotes: 0
Views: 634
Reputation: 855
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:
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!
Upvotes: 0