Replace deprecated deferred.error() with fail()