{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/raven-java/issues/180","repository_url":"https://api.github.com/repos/getsentry/raven-java","labels_url":"https://api.github.com/repos/getsentry/raven-java/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/raven-java/issues/180/comments","events_url":"https://api.github.com/repos/getsentry/raven-java/issues/180/events","html_url":"https://github.com/getsentry/raven-java/issues/180","id":137957360,"number":180,"title":"Add callback for event send failure","user":{"login":"mnussbaum","id":473482,"avatar_url":"https://avatars.githubusercontent.com/u/473482?v=3","gravatar_id":"","url":"https://api.github.com/users/mnussbaum","html_url":"https://github.com/mnussbaum","followers_url":"https://api.github.com/users/mnussbaum/followers","following_url":"https://api.github.com/users/mnussbaum/following{/other_user}","gists_url":"https://api.github.com/users/mnussbaum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnussbaum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnussbaum/subscriptions","organizations_url":"https://api.github.com/users/mnussbaum/orgs","repos_url":"https://api.github.com/users/mnussbaum/repos","events_url":"https://api.github.com/users/mnussbaum/events{/privacy}","received_events_url":"https://api.github.com/users/mnussbaum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-02T18:45:25Z","updated_at":"2016-03-02T18:45:45Z","closed_at":null,"body":"Opening this issue to get feeback about an idea for an error handler callback when an event fails to send to the Sentry server. This is definitely an edge case, but ensuring that exceptions aren't lost is important for our application stability.\r\n\r\nThe approach we're thinking of is adding an optional `onSendError` callback argument to `RavenFactory.ravenInstance`. The callback will take two arguments, the event that failed to send, and the exception that prevented sending. The callback will be passed down to the classes implementing `AbstractConnection`, and it will be invoked in [`ConnectionException` handler in `send`](https://github.com/getsentry/raven-java/blob/00abd1c998dd647ecfd879be1fc6fc9429334c11/raven/src/main/java/net/kencochrane/raven/connection/AbstractConnection.java#L81).\r\n\r\nWhat do you think about this approach? If it sounds promising I'm happy to write a pull request."},"comment":{"url":"https://api.github.com/repos/getsentry/raven-java/issues/comments/191367754","html_url":"https://github.com/getsentry/raven-java/issues/180#issuecomment-191367754","issue_url":"https://api.github.com/repos/getsentry/raven-java/issues/180","id":191367754,"user":{"login":"mnussbaum","id":473482,"avatar_url":"https://avatars.githubusercontent.com/u/473482?v=3","gravatar_id":"","url":"https://api.github.com/users/mnussbaum","html_url":"https://github.com/mnussbaum","followers_url":"https://api.github.com/users/mnussbaum/followers","following_url":"https://api.github.com/users/mnussbaum/following{/other_user}","gists_url":"https://api.github.com/users/mnussbaum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnussbaum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnussbaum/subscriptions","organizations_url":"https://api.github.com/users/mnussbaum/orgs","repos_url":"https://api.github.com/users/mnussbaum/repos","events_url":"https://api.github.com/users/mnussbaum/events{/privacy}","received_events_url":"https://api.github.com/users/mnussbaum/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T18:45:45Z","updated_at":"2016-03-02T18:45:45Z","body":"CC @jszwedko"}}