{"issue":{"title":"jQuery deferred fail is never called","user":{"login":"tomsdev","id":1284597,"url":"https://api.github.com/users/tomsdev","avatar_url":"https://secure.gravatar.com/avatar/4414bfaa55a95568a7819cb03edca762?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4414bfaa55a95568a7819cb03edca762"},"created_at":"2011-12-27T12:27:54Z","milestone":null,"labels":[],"state":"open","updated_at":"2011-12-28T09:11:55Z","id":2663030,"closed_at":null,"html_url":"https://github.com/SignalR/SignalR/issues/107","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"In the documentation (https://github.com/SignalR/SignalR/wiki/SignalR-JS-Client-Hubs) it says that invoking methods ont the server return a jQuery deferred, so we can have this on our client:\r\n\r\nmyHub.someMethod()\r\n     .done(function(result) {\r\n     })\r\n     .fail(function(error) {\r\n     });\r\n\r\nBut fail is actually never called.\r\n\r\nI've tried to raise an exception on the server and also to stop the server but fail isn't called.\r\n\r\nWithout that i wonder how we can properly handle errors?","number":107,"url":"https://api.github.com/repos/SignalR/SignalR/issues/107","comments":4,"assignee":null},"comment":{"user":{"login":"tomsdev","id":1284597,"url":"https://api.github.com/users/tomsdev","avatar_url":"https://secure.gravatar.com/avatar/4414bfaa55a95568a7819cb03edca762?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4414bfaa55a95568a7819cb03edca762"},"created_at":"2011-12-28T09:11:55Z","updated_at":"2011-12-28T09:11:55Z","id":3289228,"body":"2. I tried the sample, it works but if you replace:\r\n```\r\npublic Task TaskWithException()\r\n        {\r\n            return Task.Factory.StartNew(() =>\r\n            {\r\n                throw new Exception();\r\n            });\r\n        }\r\n```\r\nwith that: (as in my solution, i had a Task return value with type int here)\r\n```\r\npublic Task<int> TaskWithException()\r\n        {\r\n            return Task<int>.Factory.StartNew(() =>\r\n            {\r\n                throw new Exception();\r\n            });\r\n        }\r\n```\r\nIt doesn't works, fail() is not called, should be a bug.","url":"https://api.github.com/repos/SignalR/SignalR/issues/comments/3289228"},"action":"created"}