Modifications for returning "ERROR" in web-service.

Change-Id: Ib6386e0dbaa13adb6046cb03db706e4159b1e964