Replace deprecated .error() by .fail()

Change-Id: Icdd0f01da029074bc06b7141ca9063a375843e63
Merge "Replace deprecated .error() by .fail()"