Maybe not a big deal but to be consistent you'd do: 

deferred.reject("Connection failed");

put second callback function in the invocation:
function(reason){ alert(reason); }