Adds error to delete method.

Signed-off-by: JerinJ <jerinj@cybage.com>