Introduce HttpStatusCode
RESTCONF fall into two categories a success, indicating a 20x status or
a failure, indicating a 40x status. RestconfDocumentedException acts as
a wrapper for the latter case, with the additional twist of being able
to report multiple errors via the 'yang-errors' template.
All failure modes in RESTCONF end up being driven by a YANG ErrorTag,
hence our server-size response structure really wants to be split along
success/failure lines.
This patch takes the first step towards that split, defining a
restconf.api.HttpStatusCode, which acts as a semantic capture of a HTTP
Status Code and use that in error mapping logic.
While we are visiting here, we make the status code for data-missing
configurable for each northbound instance -- rather than our previous
use of a global property.
JIRA: NETCONF-1188
Change-Id: I1365256f9fad4ffe66358e6e9da4dfa337a755fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 files changed: