From ab404fa2f815e9cae546d700d5280600bf990e26 Mon Sep 17 00:00:00 2001 From: Nagaraju Goruganti Date: Thu, 14 Dec 2017 10:24:40 -0600 Subject: rest_dbus.py:Update abort message for do_post -When args are in correct format, but are not in accepted range, in this case the current abort message not seems meaningful. -Updated abort message to suite for both cases when the arg type is not correct or arg value is not in accepted range. Fixes openbmc/openbmc#2576 Change-Id: Id35241b05cd193172e2b7b1c905c396d0f9a9b4b Signed-off-by: Nagaraju Goruganti --- module/obmc/wsgi/apps/rest_dbus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/obmc/wsgi') diff --git a/module/obmc/wsgi/apps/rest_dbus.py b/module/obmc/wsgi/apps/rest_dbus.py index 0ea921e..3d056fb 100644 --- a/module/obmc/wsgi/apps/rest_dbus.py +++ b/module/obmc/wsgi/apps/rest_dbus.py @@ -386,7 +386,7 @@ class MethodHandler(RouteHandler): self.do_post(path, method, False) return except Exception as ex: - abort(400, "Failed to convert the types") + abort(400, "Bad Request/Invalid Args given") abort(400, str(e)) if e.get_dbus_name() == DBUS_TYPE_ERROR: -- cgit v1.2.1