{"action":"created","comment":{"url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/comments/90963587","pull_request_review_id":11477056,"id":90963587,"diff_hunk":"@@ -154,17 +155,25 @@ defmodule Thrift.Generator.StructBinaryProtocol do\n   def field_deserializer(:string, field, name, _file_group) do\n     quote do\n       defp unquote(name)(<<11, unquote(field.id)::16-signed, string_size::32-signed, rest::binary>>, acc) do\n-        <<value::binary-size(string_size), rest::binary>> = rest\n-        unquote(name)(rest, %{acc | unquote(field.name) => value})\n+        case rest do\n+          <<value::binary-size(string_size), rest::binary>> ->\n+            unquote(name)(rest, %{acc | unquote(field.name) => value})\n+          _ ->\n+            :error","path":"lib/thrift/generator/struct_binary_protocol.ex","position":18,"original_position":18,"commit_id":"7e777171c494a0271ff17d38b448582b1f6c80e7","original_commit_id":"7e777171c494a0271ff17d38b448582b1f6c80e7","user":{"login":"scohen","id":55809,"avatar_url":"https://avatars.githubusercontent.com/u/55809?v=3","gravatar_id":"","url":"https://api.github.com/users/scohen","html_url":"https://github.com/scohen","followers_url":"https://api.github.com/users/scohen/followers","following_url":"https://api.github.com/users/scohen/following{/other_user}","gists_url":"https://api.github.com/users/scohen/gists{/gist_id}","starred_url":"https://api.github.com/users/scohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scohen/subscriptions","organizations_url":"https://api.github.com/users/scohen/orgs","repos_url":"https://api.github.com/users/scohen/repos","events_url":"https://api.github.com/users/scohen/events{/privacy}","received_events_url":"https://api.github.com/users/scohen/received_events","type":"User","site_admin":false},"body":"Why not `{:error, :deserialization_failed}` ? ","created_at":"2016-12-05T21:51:22Z","updated_at":"2016-12-05T21:51:49Z","html_url":"https://github.com/pinterest/elixir-thrift/pull/63#discussion_r90963587","pull_request_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/63","_links":{"self":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/comments/90963587"},"html":{"href":"https://github.com/pinterest/elixir-thrift/pull/63#discussion_r90963587"},"pull_request":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/63"}}},"pull_request":{"url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/63","id":96612133,"html_url":"https://github.com/pinterest/elixir-thrift/pull/63","diff_url":"https://github.com/pinterest/elixir-thrift/pull/63.diff","patch_url":"https://github.com/pinterest/elixir-thrift/pull/63.patch","issue_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues/63","number":63,"state":"open","locked":false,"title":"Return :error on deserialization failure","user":{"login":"pguillory","id":304366,"avatar_url":"https://avatars.githubusercontent.com/u/304366?v=3","gravatar_id":"","url":"https://api.github.com/users/pguillory","html_url":"https://github.com/pguillory","followers_url":"https://api.github.com/users/pguillory/followers","following_url":"https://api.github.com/users/pguillory/following{/other_user}","gists_url":"https://api.github.com/users/pguillory/gists{/gist_id}","starred_url":"https://api.github.com/users/pguillory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pguillory/subscriptions","organizations_url":"https://api.github.com/users/pguillory/orgs","repos_url":"https://api.github.com/users/pguillory/repos","events_url":"https://api.github.com/users/pguillory/events{/privacy}","received_events_url":"https://api.github.com/users/pguillory/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-05T21:25:09Z","updated_at":"2016-12-05T21:51:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07b67b4885e964ec85ca2ff9505954d3f3a388b4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/63/commits","review_comments_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/63/comments","review_comment_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues/63/comments","statuses_url":"https://api.github.com/repos/pinterest/elixir-thrift/statuses/7e777171c494a0271ff17d38b448582b1f6c80e7","head":{"label":"pguillory:error","ref":"error","sha":"7e777171c494a0271ff17d38b448582b1f6c80e7","user":{"login":"pguillory","id":304366,"avatar_url":"https://avatars.githubusercontent.com/u/304366?v=3","gravatar_id":"","url":"https://api.github.com/users/pguillory","html_url":"https://github.com/pguillory","followers_url":"https://api.github.com/users/pguillory/followers","following_url":"https://api.github.com/users/pguillory/following{/other_user}","gists_url":"https://api.github.com/users/pguillory/gists{/gist_id}","starred_url":"https://api.github.com/users/pguillory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pguillory/subscriptions","organizations_url":"https://api.github.com/users/pguillory/orgs","repos_url":"https://api.github.com/users/pguillory/repos","events_url":"https://api.github.com/users/pguillory/events{/privacy}","received_events_url":"https://api.github.com/users/pguillory/received_events","type":"User","site_admin":false},"repo":{"id":73316748,"name":"elixir-thrift","full_name":"pguillory/elixir-thrift","owner":{"login":"pguillory","id":304366,"avatar_url":"https://avatars.githubusercontent.com/u/304366?v=3","gravatar_id":"","url":"https://api.github.com/users/pguillory","html_url":"https://github.com/pguillory","followers_url":"https://api.github.com/users/pguillory/followers","following_url":"https://api.github.com/users/pguillory/following{/other_user}","gists_url":"https://api.github.com/users/pguillory/gists{/gist_id}","starred_url":"https://api.github.com/users/pguillory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pguillory/subscriptions","organizations_url":"https://api.github.com/users/pguillory/orgs","repos_url":"https://api.github.com/users/pguillory/repos","events_url":"https://api.github.com/users/pguillory/events{/privacy}","received_events_url":"https://api.github.com/users/pguillory/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pguillory/elixir-thrift","description":"Thrift Utilities for Elixir","fork":true,"url":"https://api.github.com/repos/pguillory/elixir-thrift","forks_url":"https://api.github.com/repos/pguillory/elixir-thrift/forks","keys_url":"https://api.github.com/repos/pguillory/elixir-thrift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pguillory/elixir-thrift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pguillory/elixir-thrift/teams","hooks_url":"https://api.github.com/repos/pguillory/elixir-thrift/hooks","issue_events_url":"https://api.github.com/repos/pguillory/elixir-thrift/issues/events{/number}","events_url":"https://api.github.com/repos/pguillory/elixir-thrift/events","assignees_url":"https://api.github.com/repos/pguillory/elixir-thrift/assignees{/user}","branches_url":"https://api.github.com/repos/pguillory/elixir-thrift/branches{/branch}","tags_url":"https://api.github.com/repos/pguillory/elixir-thrift/tags","blobs_url":"https://api.github.com/repos/pguillory/elixir-thrift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pguillory/elixir-thrift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pguillory/elixir-thrift/git/refs{/sha}","trees_url":"https://api.github.com/repos/pguillory/elixir-thrift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pguillory/elixir-thrift/statuses/{sha}","languages_url":"https://api.github.com/repos/pguillory/elixir-thrift/languages","stargazers_url":"https://api.github.com/repos/pguillory/elixir-thrift/stargazers","contributors_url":"https://api.github.com/repos/pguillory/elixir-thrift/contributors","subscribers_url":"https://api.github.com/repos/pguillory/elixir-thrift/subscribers","subscription_url":"https://api.github.com/repos/pguillory/elixir-thrift/subscription","commits_url":"https://api.github.com/repos/pguillory/elixir-thrift/commits{/sha}","git_commits_url":"https://api.github.com/repos/pguillory/elixir-thrift/git/commits{/sha}","comments_url":"https://api.github.com/repos/pguillory/elixir-thrift/comments{/number}","issue_comment_url":"https://api.github.com/repos/pguillory/elixir-thrift/issues/comments{/number}","contents_url":"https://api.github.com/repos/pguillory/elixir-thrift/contents/{+path}","compare_url":"https://api.github.com/repos/pguillory/elixir-thrift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pguillory/elixir-thrift/merges","archive_url":"https://api.github.com/repos/pguillory/elixir-thrift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pguillory/elixir-thrift/downloads","issues_url":"https://api.github.com/repos/pguillory/elixir-thrift/issues{/number}","pulls_url":"https://api.github.com/repos/pguillory/elixir-thrift/pulls{/number}","milestones_url":"https://api.github.com/repos/pguillory/elixir-thrift/milestones{/number}","notifications_url":"https://api.github.com/repos/pguillory/elixir-thrift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pguillory/elixir-thrift/labels{/name}","releases_url":"https://api.github.com/repos/pguillory/elixir-thrift/releases{/id}","deployments_url":"https://api.github.com/repos/pguillory/elixir-thrift/deployments","created_at":"2016-11-09T19:59:13Z","updated_at":"2016-11-09T19:59:14Z","pushed_at":"2016-12-05T21:23:34Z","git_url":"git://github.com/pguillory/elixir-thrift.git","ssh_url":"git@github.com:pguillory/elixir-thrift.git","clone_url":"https://github.com/pguillory/elixir-thrift.git","svn_url":"https://github.com/pguillory/elixir-thrift","homepage":"https://hexdocs.pm/thrift/","size":256,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pinterest:master","ref":"master","sha":"b3ec59a87b3123bdae2a9699f506ff317fc7beb7","user":{"login":"pinterest","id":541152,"avatar_url":"https://avatars.githubusercontent.com/u/541152?v=3","gravatar_id":"","url":"https://api.github.com/users/pinterest","html_url":"https://github.com/pinterest","followers_url":"https://api.github.com/users/pinterest/followers","following_url":"https://api.github.com/users/pinterest/following{/other_user}","gists_url":"https://api.github.com/users/pinterest/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest/subscriptions","organizations_url":"https://api.github.com/users/pinterest/orgs","repos_url":"https://api.github.com/users/pinterest/repos","events_url":"https://api.github.com/users/pinterest/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest/received_events","type":"Organization","site_admin":false},"repo":{"id":43914111,"name":"elixir-thrift","full_name":"pinterest/elixir-thrift","owner":{"login":"pinterest","id":541152,"avatar_url":"https://avatars.githubusercontent.com/u/541152?v=3","gravatar_id":"","url":"https://api.github.com/users/pinterest","html_url":"https://github.com/pinterest","followers_url":"https://api.github.com/users/pinterest/followers","following_url":"https://api.github.com/users/pinterest/following{/other_user}","gists_url":"https://api.github.com/users/pinterest/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest/subscriptions","organizations_url":"https://api.github.com/users/pinterest/orgs","repos_url":"https://api.github.com/users/pinterest/repos","events_url":"https://api.github.com/users/pinterest/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pinterest/elixir-thrift","description":"Thrift Utilities for Elixir","fork":false,"url":"https://api.github.com/repos/pinterest/elixir-thrift","forks_url":"https://api.github.com/repos/pinterest/elixir-thrift/forks","keys_url":"https://api.github.com/repos/pinterest/elixir-thrift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pinterest/elixir-thrift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pinterest/elixir-thrift/teams","hooks_url":"https://api.github.com/repos/pinterest/elixir-thrift/hooks","issue_events_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues/events{/number}","events_url":"https://api.github.com/repos/pinterest/elixir-thrift/events","assignees_url":"https://api.github.com/repos/pinterest/elixir-thrift/assignees{/user}","branches_url":"https://api.github.com/repos/pinterest/elixir-thrift/branches{/branch}","tags_url":"https://api.github.com/repos/pinterest/elixir-thrift/tags","blobs_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/refs{/sha}","trees_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pinterest/elixir-thrift/statuses/{sha}","languages_url":"https://api.github.com/repos/pinterest/elixir-thrift/languages","stargazers_url":"https://api.github.com/repos/pinterest/elixir-thrift/stargazers","contributors_url":"https://api.github.com/repos/pinterest/elixir-thrift/contributors","subscribers_url":"https://api.github.com/repos/pinterest/elixir-thrift/subscribers","subscription_url":"https://api.github.com/repos/pinterest/elixir-thrift/subscription","commits_url":"https://api.github.com/repos/pinterest/elixir-thrift/commits{/sha}","git_commits_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/commits{/sha}","comments_url":"https://api.github.com/repos/pinterest/elixir-thrift/comments{/number}","issue_comment_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues/comments{/number}","contents_url":"https://api.github.com/repos/pinterest/elixir-thrift/contents/{+path}","compare_url":"https://api.github.com/repos/pinterest/elixir-thrift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pinterest/elixir-thrift/merges","archive_url":"https://api.github.com/repos/pinterest/elixir-thrift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pinterest/elixir-thrift/downloads","issues_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues{/number}","pulls_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls{/number}","milestones_url":"https://api.github.com/repos/pinterest/elixir-thrift/milestones{/number}","notifications_url":"https://api.github.com/repos/pinterest/elixir-thrift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pinterest/elixir-thrift/labels{/name}","releases_url":"https://api.github.com/repos/pinterest/elixir-thrift/releases{/id}","deployments_url":"https://api.github.com/repos/pinterest/elixir-thrift/deployments","created_at":"2015-10-08T20:17:30Z","updated_at":"2016-11-30T19:32:01Z","pushed_at":"2016-12-05T21:25:10Z","git_url":"git://github.com/pinterest/elixir-thrift.git","ssh_url":"git@github.com:pinterest/elixir-thrift.git","clone_url":"https://github.com/pinterest/elixir-thrift.git","svn_url":"https://github.com/pinterest/elixir-thrift","homepage":"https://hexdocs.pm/thrift/","size":320,"stargazers_count":36,"watchers_count":36,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":3,"forks":11,"open_issues":3,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/63"},"html":{"href":"https://github.com/pinterest/elixir-thrift/pull/63"},"issue":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/issues/63"},"comments":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/statuses/7e777171c494a0271ff17d38b448582b1f6c80e7"}}}}
{"actor":{"display_login":"scohen"}}