Edit method and exception upon edit failures

Implemented a Client#edit method that performs an additional check for
edit failures.

Change-Id: I22754b1b4c7cf20cec296e39611b9526c204d75c