X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=a1%2Fcontroller.py;h=b3bbcdbff4b2088c6f42fb9d321d0cf2b40494f9;hb=24514469850dc9a543869f132385633039c5f5a6;hp=ca9618b72f0d870a6df8ebca14c5589fcbaac546;hpb=9407e119792b573a83369608a5187bf957aaf7c0;p=ric-plt%2Fa1.git diff --git a/a1/controller.py b/a1/controller.py index ca9618b..b3bbcdb 100644 --- a/a1/controller.py +++ b/a1/controller.py @@ -17,6 +17,7 @@ from flask import Response import connexion import json +from jsonschema.exceptions import ValidationError from a1 import get_module_logger from a1 import a1rmr, exceptions, utils @@ -47,6 +48,9 @@ def _try_func_return(func): """ try: return func() + except ValidationError as exc: + logger.exception(exc) + return "", 400 except exceptions.PolicyNotFound as exc: logger.exception(exc) return "", 404