From 4ab6b3f55e1d3da31b008830151821d5a88b83c6 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Thu, 8 Oct 2020 15:25:45 +0000 Subject: [PATCH] Fix bug 1255: returning UNPROCESSABLE_ENTITY when quota exceeded When quota exceeded for vnfds, nsds, ns_instances topics, NBI should return UNPROCESSABLE_ENTITY instead of UNAUTHORIZED Change-Id: I0a8f4dc1df844e1027ff8234f101b82baa0bcee8 Signed-off-by: garciadeblas --- osm_nbi/base_topic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm_nbi/base_topic.py b/osm_nbi/base_topic.py index 9572409..c67ec76 100644 --- a/osm_nbi/base_topic.py +++ b/osm_nbi/base_topic.py @@ -147,7 +147,7 @@ class BaseTopic: if count >= quota: name = proj["name"] raise ValidationError("quota ({}={}) exceeded for project {} ({})".format(quota_name, quota, name, pid), - http_code=HTTPStatus.UNAUTHORIZED) + http_code=HTTPStatus.UNPROCESSABLE_ENTITY) def _validate_input_new(self, input, force=False): """ -- 2.25.1