From 5342209a3dc0bf4e41cab87b894954526edcbffd Mon Sep 17 00:00:00 2001 From: Gordon Chung Date: Wed, 6 Feb 2013 12:34:06 -0500 Subject: return 400 Bad Request if invalid params supplied (bug1061738) return a 400 Bad Request if there are invalid arguments params supplied Change-Id: I82da8a6db4a2847c8407cd0917b2d71ac9f9ba7a --- keystone/common/wsgi.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keystone') diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py index 42a4bc31..92f6e1c1 100644 --- a/keystone/common/wsgi.py +++ b/keystone/common/wsgi.py @@ -233,6 +233,9 @@ class Application(BaseApplication): except exception.Error as e: LOG.warning(e) return render_exception(e) + except TypeError as e: + logging.exception(e) + return render_exception(exception.ValidationError(e)) except Exception as e: logging.exception(e) return render_exception(exception.UnexpectedError(exception=e)) -- cgit