{"action":"opened","issue":{"url":"https://api.github.com/repos/douglasaguiar/BetterPrivateObject/issues/2","labels_url":"https://api.github.com/repos/douglasaguiar/BetterPrivateObject/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/douglasaguiar/BetterPrivateObject/issues/2/comments","events_url":"https://api.github.com/repos/douglasaguiar/BetterPrivateObject/issues/2/events","html_url":"https://github.com/douglasaguiar/BetterPrivateObject/issues/2","id":103700064,"number":2,"title":"Exceptions are wrapped with TargetInvocationException","user":{"login":"vatirim","id":6742489,"avatar_url":"https://avatars.githubusercontent.com/u/6742489?v=3","gravatar_id":"","url":"https://api.github.com/users/vatirim","html_url":"https://github.com/vatirim","followers_url":"https://api.github.com/users/vatirim/followers","following_url":"https://api.github.com/users/vatirim/following{/other_user}","gists_url":"https://api.github.com/users/vatirim/gists{/gist_id}","starred_url":"https://api.github.com/users/vatirim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatirim/subscriptions","organizations_url":"https://api.github.com/users/vatirim/orgs","repos_url":"https://api.github.com/users/vatirim/repos","events_url":"https://api.github.com/users/vatirim/events{/privacy}","received_events_url":"https://api.github.com/users/vatirim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-28T11:11:00Z","updated_at":"2015-08-28T11:11:00Z","closed_at":null,"body":"When a dynamically called member is called and creates an exception, it is wrapped in a TargetInvocationException. This needs to be unwrapped in the caller, e.g. if one wants to write a test checking the exception type- and message.\r\nCatching the exception and rethrowing the inner exception is possible. However, this would be a breaking change. Therefore I first wanted to start the discussion.\r\nDoes unwrapping make sense to you?"}}