Added additional bad input error handling.

Change-Id: I1959bbdd7735efbc7110cd6ef22e29deadd4ea41
Correct flush issues.

Corrected issue when handling flush REST response.
Additionally removed the test as it is unreliable
due to not flush being async, in addition to not
fitting within the constraints of the new testing
setup.

Change-Id: I8da906d07869fc9d191cc3db9030999130b69150