{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/raven-ruby/issues/389","labels_url":"https://api.github.com/repos/getsentry/raven-ruby/issues/389/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/raven-ruby/issues/389/comments","events_url":"https://api.github.com/repos/getsentry/raven-ruby/issues/389/events","html_url":"https://github.com/getsentry/raven-ruby/issues/389","id":118429339,"number":389,"title":"Raven shouldn't raise an exception on improperly encoded data","user":{"login":"jason-o-matic","id":13733,"avatar_url":"https://avatars.githubusercontent.com/u/13733?v=3","gravatar_id":"","url":"https://api.github.com/users/jason-o-matic","html_url":"https://github.com/jason-o-matic","followers_url":"https://api.github.com/users/jason-o-matic/followers","following_url":"https://api.github.com/users/jason-o-matic/following{/other_user}","gists_url":"https://api.github.com/users/jason-o-matic/gists{/gist_id}","starred_url":"https://api.github.com/users/jason-o-matic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jason-o-matic/subscriptions","organizations_url":"https://api.github.com/users/jason-o-matic/orgs","repos_url":"https://api.github.com/users/jason-o-matic/repos","events_url":"https://api.github.com/users/jason-o-matic/events{/privacy}","received_events_url":"https://api.github.com/users/jason-o-matic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/getsentry/raven-ruby/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-23T17:23:32Z","updated_at":"2015-12-30T17:33:03Z","closed_at":null,"body":"I can see an argument for \"fail fast\" as well, but just in case you want to add some extra error handling I ran into this issue:\r\n\r\n```\r\n[13] pry(main)> Raven.capture_exception(Exception.new(\"GIF89a\\u0001\\u0000\\u0001\\u0000\\x80\\xFF\\u0000\\xFF\\xFF\\xFF\\u0000\\u0000\\u0000,\\u0000\\u0000\\u0000\\u0000\\u0001\\u0000\\u0001\\u0000\\u0000\\u0002\\u0002D\\u0001\\u0000;\"))\r\nArgumentError: invalid byte sequence in UTF-8\r\nfrom /data/docraptor/shared/bundle/ruby/2.2.0/gems/sentry-raven-0.13.3/lib/raven/processor/sanitizedata.rb:31:in `match'\r\n```\r\n\r\nThe string is gif data, but as written the string ends up having a UTF8 encoding. This means `gif =~ /asdf/` raises an exception. It might be worth updating the sanitizer to handle this. Perhaps the sanitizer could replace this value with a dummy string saying the original string had a bad encoding, or could force a binary encoding."},"comment":{"url":"https://api.github.com/repos/getsentry/raven-ruby/issues/comments/168040760","html_url":"https://github.com/getsentry/raven-ruby/issues/389#issuecomment-168040760","issue_url":"https://api.github.com/repos/getsentry/raven-ruby/issues/389","id":168040760,"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-30T17:33:03Z","updated_at":"2015-12-30T17:33:03Z","body":"@jason-o-matic Take a look at #426"}}