{"action":"created","issue":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/3475","repository_url":"https://api.github.com/repos/Particular/NServiceBus","labels_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3475/labels{/name}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3475/comments","events_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3475/events","html_url":"https://github.com/Particular/NServiceBus/pull/3475","id":134219051,"number":3475,"title":"Invoke handlers that return a null task","user":{"login":"distantcam","id":1298847,"avatar_url":"https://avatars.githubusercontent.com/u/1298847?v=3","gravatar_id":"","url":"https://api.github.com/users/distantcam","html_url":"https://github.com/distantcam","followers_url":"https://api.github.com/users/distantcam/followers","following_url":"https://api.github.com/users/distantcam/following{/other_user}","gists_url":"https://api.github.com/users/distantcam/gists{/gist_id}","starred_url":"https://api.github.com/users/distantcam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distantcam/subscriptions","organizations_url":"https://api.github.com/users/distantcam/orgs","repos_url":"https://api.github.com/users/distantcam/repos","events_url":"https://api.github.com/users/distantcam/events{/privacy}","received_events_url":"https://api.github.com/users/distantcam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Particular/NServiceBus/labels/State:%20In%20Progress","name":"State: In Progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-17T08:52:43Z","updated_at":"2016-02-17T09:29:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Particular/NServiceBus/pulls/3475","html_url":"https://github.com/Particular/NServiceBus/pull/3475","diff_url":"https://github.com/Particular/NServiceBus/pull/3475.diff","patch_url":"https://github.com/Particular/NServiceBus/pull/3475.patch"},"body":"This code allows the user to return null from a handler without crashing.\r\n\r\n    public Task Handle(MyCommand message, IMessageHandlerContext context)\r\n    {\r\n        return null;\r\n    }\r\n\r\ncc @danielmarbach "},"comment":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/comments/185114534","html_url":"https://github.com/Particular/NServiceBus/pull/3475#issuecomment-185114534","issue_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3475","id":185114534,"user":{"login":"hmemcpy","id":601206,"avatar_url":"https://avatars.githubusercontent.com/u/601206?v=3","gravatar_id":"","url":"https://api.github.com/users/hmemcpy","html_url":"https://github.com/hmemcpy","followers_url":"https://api.github.com/users/hmemcpy/followers","following_url":"https://api.github.com/users/hmemcpy/following{/other_user}","gists_url":"https://api.github.com/users/hmemcpy/gists{/gist_id}","starred_url":"https://api.github.com/users/hmemcpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmemcpy/subscriptions","organizations_url":"https://api.github.com/users/hmemcpy/orgs","repos_url":"https://api.github.com/users/hmemcpy/repos","events_url":"https://api.github.com/users/hmemcpy/events{/privacy}","received_events_url":"https://api.github.com/users/hmemcpy/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T09:29:14Z","updated_at":"2016-02-17T09:29:14Z","body":"I ended up being convinced by @danielmarbach and others about it. Yes, returning null, but the solution here is MOAR TOOLING: we can supply an analyzer that warns against returning null. That's the best I could think about helping this situation."}}