{"action":"closed","number":148,"pull_request":{"url":"https://api.github.com/repos/thoughtbot/bamboo/pulls/148","id":68513334,"html_url":"https://github.com/thoughtbot/bamboo/pull/148","diff_url":"https://github.com/thoughtbot/bamboo/pull/148.diff","patch_url":"https://github.com/thoughtbot/bamboo/pull/148.patch","issue_url":"https://api.github.com/repos/thoughtbot/bamboo/issues/148","number":148,"state":"closed","locked":false,"title":"improving error message when invalid mailer configuration","user":{"login":"martinos","id":104921,"avatar_url":"https://avatars.githubusercontent.com/u/104921?v=3","gravatar_id":"","url":"https://api.github.com/users/martinos","html_url":"https://github.com/martinos","followers_url":"https://api.github.com/users/martinos/followers","following_url":"https://api.github.com/users/martinos/following{/other_user}","gists_url":"https://api.github.com/users/martinos/gists{/gist_id}","starred_url":"https://api.github.com/users/martinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinos/subscriptions","organizations_url":"https://api.github.com/users/martinos/orgs","repos_url":"https://api.github.com/users/martinos/repos","events_url":"https://api.github.com/users/martinos/events{/privacy}","received_events_url":"https://api.github.com/users/martinos/received_events","type":"User","site_admin":false},"body":"If we don't configure properly the mailer, there is a compiler error that does not give much information.\r\nSee issue: #149\r\n```\r\n= Compilation error on file lib/mailer.ex ==\r\n** (Protocol.UndefinedError) protocol Enumerable not implemented for nil\r\n    (elixir) lib/enum.ex:1: Enumerable.impl_for!/1\r\n    (elixir) lib/enum.ex:116: Enumerable.reduce/3\r\n    (elixir) lib/enum.ex:1486: Enum.reduce/3\r\n    lib/bamboo/mailer.ex:187: Bamboo.Mailer.parse_opts/2\r\n    lib/mailer.ex:2: (module)\r\n    (stdlib) erl_eval.erl:669: :erl_eval.do_apply/6\r\n    (elixir) lib/kernel/parallel_compiler.ex:100: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/8\r\n```\r\nBy doing the change in this pull request we get a better error message:\r\n\r\n```\r\n== Compilation error on file lib/mailer.ex ==\r\n** (ArgumentError) application :basic_guardian is not loaded, or the configuration parameter BasicGuardian.Mailer is not set\r\n    (elixir) lib/application.ex:203: Application.fetch_env!/2\r\n    lib/bamboo/mailer.ex:187: Bamboo.Mailer.parse_opts/2\r\n    lib/mailer.ex:2: (module)\r\n    (stdlib) erl_eval.erl:669: :erl_eval.do_apply/6\r\n    (elixir) lib/kernel/parallel_compiler.ex:100: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/8\r\n```\r\n```\r\n```","created_at":"2016-05-02T00:42:58Z","updated_at":"2016-05-03T18:03:44Z","closed_at":"2016-05-03T18:03:43Z","merged_at":"2016-05-03T18:03:43Z","merge_commit_sha":"70176a338280db211a7dc31562a13cd45f367611","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/bamboo/pulls/148/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/bamboo/pulls/148/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/bamboo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/bamboo/issues/148/comments","statuses_url":"https://api.github.com/repos/thoughtbot/bamboo/statuses/eb51979b1af6c0813411ded291e0efd773bcec33","head":{"label":"martinos:master","ref":"master","sha":"eb51979b1af6c0813411ded291e0efd773bcec33","user":{"login":"martinos","id":104921,"avatar_url":"https://avatars.githubusercontent.com/u/104921?v=3","gravatar_id":"","url":"https://api.github.com/users/martinos","html_url":"https://github.com/martinos","followers_url":"https://api.github.com/users/martinos/followers","following_url":"https://api.github.com/users/martinos/following{/other_user}","gists_url":"https://api.github.com/users/martinos/gists{/gist_id}","starred_url":"https://api.github.com/users/martinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinos/subscriptions","organizations_url":"https://api.github.com/users/martinos/orgs","repos_url":"https://api.github.com/users/martinos/repos","events_url":"https://api.github.com/users/martinos/events{/privacy}","received_events_url":"https://api.github.com/users/martinos/received_events","type":"User","site_admin":false},"repo":{"id":57858240,"name":"bamboo","full_name":"martinos/bamboo","owner":{"login":"martinos","id":104921,"avatar_url":"https://avatars.githubusercontent.com/u/104921?v=3","gravatar_id":"","url":"https://api.github.com/users/martinos","html_url":"https://github.com/martinos","followers_url":"https://api.github.com/users/martinos/followers","following_url":"https://api.github.com/users/martinos/following{/other_user}","gists_url":"https://api.github.com/users/martinos/gists{/gist_id}","starred_url":"https://api.github.com/users/martinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinos/subscriptions","organizations_url":"https://api.github.com/users/martinos/orgs","repos_url":"https://api.github.com/users/martinos/repos","events_url":"https://api.github.com/users/martinos/events{/privacy}","received_events_url":"https://api.github.com/users/martinos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martinos/bamboo","description":"Testable, composable, and adapter based elixir email library for devs that love piping.","fork":true,"url":"https://api.github.com/repos/martinos/bamboo","forks_url":"https://api.github.com/repos/martinos/bamboo/forks","keys_url":"https://api.github.com/repos/martinos/bamboo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinos/bamboo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinos/bamboo/teams","hooks_url":"https://api.github.com/repos/martinos/bamboo/hooks","issue_events_url":"https://api.github.com/repos/martinos/bamboo/issues/events{/number}","events_url":"https://api.github.com/repos/martinos/bamboo/events","assignees_url":"https://api.github.com/repos/martinos/bamboo/assignees{/user}","branches_url":"https://api.github.com/repos/martinos/bamboo/branches{/branch}","tags_url":"https://api.github.com/repos/martinos/bamboo/tags","blobs_url":"https://api.github.com/repos/martinos/bamboo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinos/bamboo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinos/bamboo/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinos/bamboo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinos/bamboo/statuses/{sha}","languages_url":"https://api.github.com/repos/martinos/bamboo/languages","stargazers_url":"https://api.github.com/repos/martinos/bamboo/stargazers","contributors_url":"https://api.github.com/repos/martinos/bamboo/contributors","subscribers_url":"https://api.github.com/repos/martinos/bamboo/subscribers","subscription_url":"https://api.github.com/repos/martinos/bamboo/subscription","commits_url":"https://api.github.com/repos/martinos/bamboo/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinos/bamboo/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinos/bamboo/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinos/bamboo/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinos/bamboo/contents/{+path}","compare_url":"https://api.github.com/repos/martinos/bamboo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinos/bamboo/merges","archive_url":"https://api.github.com/repos/martinos/bamboo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinos/bamboo/downloads","issues_url":"https://api.github.com/repos/martinos/bamboo/issues{/number}","pulls_url":"https://api.github.com/repos/martinos/bamboo/pulls{/number}","milestones_url":"https://api.github.com/repos/martinos/bamboo/milestones{/number}","notifications_url":"https://api.github.com/repos/martinos/bamboo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinos/bamboo/labels{/name}","releases_url":"https://api.github.com/repos/martinos/bamboo/releases{/id}","deployments_url":"https://api.github.com/repos/martinos/bamboo/deployments","created_at":"2016-05-02T00:32:07Z","updated_at":"2016-05-02T00:32:08Z","pushed_at":"2016-05-03T17:51:39Z","git_url":"git://github.com/martinos/bamboo.git","ssh_url":"git@github.com:martinos/bamboo.git","clone_url":"https://github.com/martinos/bamboo.git","svn_url":"https://github.com/martinos/bamboo","homepage":"https://hex.pm/packages/bamboo","size":182,"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":"thoughtbot:master","ref":"master","sha":"a04fbf8299129a0c5c76922e66d8b060c28061eb","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":45436531,"name":"bamboo","full_name":"thoughtbot/bamboo","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/bamboo","description":"Testable, composable, and adapter based elixir email library for devs that love piping.","fork":false,"url":"https://api.github.com/repos/thoughtbot/bamboo","forks_url":"https://api.github.com/repos/thoughtbot/bamboo/forks","keys_url":"https://api.github.com/repos/thoughtbot/bamboo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/bamboo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/bamboo/teams","hooks_url":"https://api.github.com/repos/thoughtbot/bamboo/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/bamboo/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/bamboo/events","assignees_url":"https://api.github.com/repos/thoughtbot/bamboo/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/bamboo/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/bamboo/tags","blobs_url":"https://api.github.com/repos/thoughtbot/bamboo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/bamboo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/bamboo/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/bamboo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/bamboo/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/bamboo/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/bamboo/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/bamboo/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/bamboo/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/bamboo/subscription","commits_url":"https://api.github.com/repos/thoughtbot/bamboo/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/bamboo/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/bamboo/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/bamboo/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/bamboo/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/bamboo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/bamboo/merges","archive_url":"https://api.github.com/repos/thoughtbot/bamboo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/bamboo/downloads","issues_url":"https://api.github.com/repos/thoughtbot/bamboo/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/bamboo/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/bamboo/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/bamboo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/bamboo/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/bamboo/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/bamboo/deployments","created_at":"2015-11-03T02:30:34Z","updated_at":"2016-05-02T20:19:04Z","pushed_at":"2016-05-03T18:03:44Z","git_url":"git://github.com/thoughtbot/bamboo.git","ssh_url":"git@github.com:thoughtbot/bamboo.git","clone_url":"https://github.com/thoughtbot/bamboo.git","svn_url":"https://github.com/thoughtbot/bamboo","homepage":"https://hex.pm/packages/bamboo","size":412,"stargazers_count":189,"watchers_count":189,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":13,"forks":12,"open_issues":13,"watchers":189,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/bamboo/pulls/148"},"html":{"href":"https://github.com/thoughtbot/bamboo/pull/148"},"issue":{"href":"https://api.github.com/repos/thoughtbot/bamboo/issues/148"},"comments":{"href":"https://api.github.com/repos/thoughtbot/bamboo/issues/148/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/bamboo/pulls/148/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/bamboo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/bamboo/pulls/148/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/bamboo/statuses/eb51979b1af6c0813411ded291e0efd773bcec33"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"paulcsmith","id":22394,"avatar_url":"https://avatars.githubusercontent.com/u/22394?v=3","gravatar_id":"","url":"https://api.github.com/users/paulcsmith","html_url":"https://github.com/paulcsmith","followers_url":"https://api.github.com/users/paulcsmith/followers","following_url":"https://api.github.com/users/paulcsmith/following{/other_user}","gists_url":"https://api.github.com/users/paulcsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/paulcsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulcsmith/subscriptions","organizations_url":"https://api.github.com/users/paulcsmith/orgs","repos_url":"https://api.github.com/users/paulcsmith/repos","events_url":"https://api.github.com/users/paulcsmith/events{/privacy}","received_events_url":"https://api.github.com/users/paulcsmith/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}