From b9fa3b42141d3b37a4ee3a1311c9e09c89635390 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 12 Aug 2015 10:19:17 +0200 Subject: [PATCH] Document error response format in HTTP-API.rst Change-Id: I9e75320b982aae4a52820bf620a29235413e5582 Closes-Bug: #1473106 --- HTTP-API.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/HTTP-API.rst b/HTTP-API.rst index 3ed5bdc37..85e092ba6 100644 --- a/HTTP-API.rst +++ b/HTTP-API.rst @@ -107,6 +107,23 @@ body will contain the following keys: .. _Setting IPMI Credentials: https://github.com/openstack/ironic-inspector#setting-ipmi-credentials .. _Plugins: https://github.com/openstack/ironic-inspector#plugins +Error Response +~~~~~~~~~~~~~~ + +If an error happens during request processing, **Ironic Inspector** returns +a response with an appropriate HTTP code set, e.g. 400 for bad request or +404 when something was not found (usually node in cache or node in ironic). +The following JSON body is returned:: + + { + "error": { + "message": "Full error message" + } + } + +This body may be extended in the future to include details that are more error +specific. + API Versioning ~~~~~~~~~~~~~~