Merge pull request #11 from bradbishop/typeerrors

Handle type errors for method call parameters.
diff --git a/obmc-rest b/obmc-rest
index 58e3da7..82f71c0 100644
--- a/obmc-rest
+++ b/obmc-rest
@@ -18,6 +18,7 @@
 DBUS_UNKNOWN_INTERFACE = 'org.freedesktop.UnknownInterface'
 DBUS_UNKNOWN_METHOD = 'org.freedesktop.DBus.Error.UnknownMethod'
 DBUS_INVALID_ARGS = 'org.freedesktop.DBus.Error.InvalidArgs'
+DBUS_TYPE_ERROR = 'org.freedesktop.DBus.Python.TypeError'
 DELETE_IFACE = 'org.openbmc.Object.Delete'
 
 _4034_msg = "The specified %s cannot be %s: '%s'"
@@ -243,6 +244,8 @@
 		except dbus.exceptions.DBusException, e:
 			if e.get_dbus_name() == DBUS_INVALID_ARGS:
 				abort(400, str(e))
+			if e.get_dbus_name() == DBUS_TYPE_ERROR:
+				abort(400, str(e))
 			raise
 
 	@staticmethod