{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/raven-ruby/issues/379","labels_url":"https://api.github.com/repos/getsentry/raven-ruby/issues/379/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/raven-ruby/issues/379/comments","events_url":"https://api.github.com/repos/getsentry/raven-ruby/issues/379/events","html_url":"https://github.com/getsentry/raven-ruby/pull/379","id":111915547,"number":379,"title":"configuration.unsent_event for Unsent Events","user":{"login":"abhillman","id":1097794,"avatar_url":"https://avatars.githubusercontent.com/u/1097794?v=3","gravatar_id":"","url":"https://api.github.com/users/abhillman","html_url":"https://github.com/abhillman","followers_url":"https://api.github.com/users/abhillman/followers","following_url":"https://api.github.com/users/abhillman/following{/other_user}","gists_url":"https://api.github.com/users/abhillman/gists{/gist_id}","starred_url":"https://api.github.com/users/abhillman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhillman/subscriptions","organizations_url":"https://api.github.com/users/abhillman/orgs","repos_url":"https://api.github.com/users/abhillman/repos","events_url":"https://api.github.com/users/abhillman/events{/privacy}","received_events_url":"https://api.github.com/users/abhillman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/getsentry/raven-ruby/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/getsentry/raven-ruby/labels/waiting/blocked","name":"waiting/blocked","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-16T21:37:07Z","updated_at":"2015-12-30T16:52:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/getsentry/raven-ruby/pulls/379","html_url":"https://github.com/getsentry/raven-ruby/pull/379","diff_url":"https://github.com/getsentry/raven-ruby/pull/379.diff","patch_url":"https://github.com/getsentry/raven-ruby/pull/379.patch"},"body":"Thank you kindly for considering this PR. This PR addresses https://github.com/getsentry/raven-ruby/issues/376. It does this by implementing a configuration parameter `unsent_event` which is a Proc that is called if:\r\n\r\n* the client is in a failure state and is not sending messages\r\n* the server, when using the HTTPTransport, responds with a non-200 status code\r\n* when the transport raises a runtime exception (HTTP, UDP, or any other transport)\r\n\r\nIts semantics are similar to `async` — i.e. the default value for the parameter is `false` and we do some checking on the parameter just like `async` to make sure the value is `false` or a callable. These changes are near-robust. I spent quite a long time playing with writing tests in `raven_spec.rb`, but ran into some roadblocks and could use a little help if any maintainers have a spare moment.\r\n\r\nThank you again kindly for considering this PR. This enhancement will be greatly helpful for my active use of raven-ruby and Sentry."},"comment":{"url":"https://api.github.com/repos/getsentry/raven-ruby/issues/comments/168033020","html_url":"https://github.com/getsentry/raven-ruby/pull/379#issuecomment-168033020","issue_url":"https://api.github.com/repos/getsentry/raven-ruby/issues/379","id":168033020,"user":{"login":"nateberkopec","id":845662,"avatar_url":"https://avatars.githubusercontent.com/u/845662?v=3","gravatar_id":"","url":"https://api.github.com/users/nateberkopec","html_url":"https://github.com/nateberkopec","followers_url":"https://api.github.com/users/nateberkopec/followers","following_url":"https://api.github.com/users/nateberkopec/following{/other_user}","gists_url":"https://api.github.com/users/nateberkopec/gists{/gist_id}","starred_url":"https://api.github.com/users/nateberkopec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nateberkopec/subscriptions","organizations_url":"https://api.github.com/users/nateberkopec/orgs","repos_url":"https://api.github.com/users/nateberkopec/repos","events_url":"https://api.github.com/users/nateberkopec/events{/privacy}","received_events_url":"https://api.github.com/users/nateberkopec/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T16:52:34Z","updated_at":"2015-12-30T16:52:34Z","body":"@abhillman ping, had some questions but definitely want to merge this."}}