{"action":"created","comment":{"url":"https://api.github.com/repos/NancyFx/Nancy/pulls/comments/39216352","id":39216352,"diff_hunk":"@@ -62,47 +66,60 @@ public void Handle(HttpStatusCode statusCode, NancyContext context)\n                 return;\r\n             }\r\n \r\n-            string errorPage;\r\n-\r\n-            if (!this.errorPages.TryGetValue(statusCode, out errorPage))\r\n+            if (!this.errorMessages.ContainsKey(statusCode) || !this.errorPages.ContainsKey(statusCode))\r","path":"src/Nancy/ErrorHandling/DefaultStatusCodeHandler.cs","position":71,"original_position":71,"commit_id":"cc56a77098eef44dc2b8a6249017809f373f4867","original_commit_id":"cc56a77098eef44dc2b8a6249017809f373f4867","user":{"login":"horsdal","id":676126,"avatar_url":"https://avatars.githubusercontent.com/u/676126?v=3","gravatar_id":"","url":"https://api.github.com/users/horsdal","html_url":"https://github.com/horsdal","followers_url":"https://api.github.com/users/horsdal/followers","following_url":"https://api.github.com/users/horsdal/following{/other_user}","gists_url":"https://api.github.com/users/horsdal/gists{/gist_id}","starred_url":"https://api.github.com/users/horsdal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horsdal/subscriptions","organizations_url":"https://api.github.com/users/horsdal/orgs","repos_url":"https://api.github.com/users/horsdal/repos","events_url":"https://api.github.com/users/horsdal/events{/privacy}","received_events_url":"https://api.github.com/users/horsdal/received_events","type":"User","site_admin":false},"body":"Is this condition correct? We bail out if the `statusCode` is not in both dictionaries. Is that right?","created_at":"2015-09-10T21:27:48Z","updated_at":"2015-09-10T21:27:48Z","html_url":"https://github.com/NancyFx/Nancy/pull/1911#discussion_r39216352","pull_request_url":"https://api.github.com/repos/NancyFx/Nancy/pulls/1911","_links":{"self":{"href":"https://api.github.com/repos/NancyFx/Nancy/pulls/comments/39216352"},"html":{"href":"https://github.com/NancyFx/Nancy/pull/1911#discussion_r39216352"},"pull_request":{"href":"https://api.github.com/repos/NancyFx/Nancy/pulls/1911"}}},"pull_request":{"url":"https://api.github.com/repos/NancyFx/Nancy/pulls/1911","id":34109479,"html_url":"https://github.com/NancyFx/Nancy/pull/1911","diff_url":"https://github.com/NancyFx/Nancy/pull/1911.diff","patch_url":"https://github.com/NancyFx/Nancy/pull/1911.patch","issue_url":"https://api.github.com/repos/NancyFx/Nancy/issues/1911","number":1911,"state":"open","locked":false,"title":"Add content negotiation to the default error handler","user":{"login":"jonathanfoster","id":1923583,"avatar_url":"https://avatars.githubusercontent.com/u/1923583?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanfoster","html_url":"https://github.com/jonathanfoster","followers_url":"https://api.github.com/users/jonathanfoster/followers","following_url":"https://api.github.com/users/jonathanfoster/following{/other_user}","gists_url":"https://api.github.com/users/jonathanfoster/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanfoster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanfoster/subscriptions","organizations_url":"https://api.github.com/users/jonathanfoster/orgs","repos_url":"https://api.github.com/users/jonathanfoster/repos","events_url":"https://api.github.com/users/jonathanfoster/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanfoster/received_events","type":"User","site_admin":false},"body":"...r now supports application/json, application/xml, and text/html. The default content type is text/html when all media types are supported (\\*/\\*). If a non-supported media type is provided then the response status code will be 406 not acceptable.\r\n\r\nI made a change to `ContextExtensions.GetExceptionDetails` that could be considered breaking. I changed the method to return `string.Empty` instead of \"None\" when no exception is found. I didn't see any other usages in the solution, but I could see a situation where a consumer of the library has a check for \"None\" that will now fail. I don't think it's a huge concern, but something to consider. I added a unit test to ensure the method returns `string.Empty` in the future. If there's an issue with this change then I could always revert it. I just thought that `string.Empty` is a more idomatic return value in this situation.","created_at":"2015-04-25T17:11:02Z","updated_at":"2015-09-10T21:27:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f31eb1cc18e73af88eeff7bee1d3230c518d72d","assignee":{"login":"thecodejunkie","id":50543,"avatar_url":"https://avatars.githubusercontent.com/u/50543?v=3","gravatar_id":"","url":"https://api.github.com/users/thecodejunkie","html_url":"https://github.com/thecodejunkie","followers_url":"https://api.github.com/users/thecodejunkie/followers","following_url":"https://api.github.com/users/thecodejunkie/following{/other_user}","gists_url":"https://api.github.com/users/thecodejunkie/gists{/gist_id}","starred_url":"https://api.github.com/users/thecodejunkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecodejunkie/subscriptions","organizations_url":"https://api.github.com/users/thecodejunkie/orgs","repos_url":"https://api.github.com/users/thecodejunkie/repos","events_url":"https://api.github.com/users/thecodejunkie/events{/privacy}","received_events_url":"https://api.github.com/users/thecodejunkie/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/NancyFx/Nancy/milestones/40","html_url":"https://github.com/NancyFx/Nancy/milestones/1.3","labels_url":"https://api.github.com/repos/NancyFx/Nancy/milestones/40/labels","id":1088307,"number":40,"title":"1.3","description":"","creator":{"login":"thecodejunkie","id":50543,"avatar_url":"https://avatars.githubusercontent.com/u/50543?v=3","gravatar_id":"","url":"https://api.github.com/users/thecodejunkie","html_url":"https://github.com/thecodejunkie","followers_url":"https://api.github.com/users/thecodejunkie/followers","following_url":"https://api.github.com/users/thecodejunkie/following{/other_user}","gists_url":"https://api.github.com/users/thecodejunkie/gists{/gist_id}","starred_url":"https://api.github.com/users/thecodejunkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecodejunkie/subscriptions","organizations_url":"https://api.github.com/users/thecodejunkie/orgs","repos_url":"https://api.github.com/users/thecodejunkie/repos","events_url":"https://api.github.com/users/thecodejunkie/events{/privacy}","received_events_url":"https://api.github.com/users/thecodejunkie/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":77,"state":"open","created_at":"2015-04-28T22:04:26Z","updated_at":"2015-09-10T11:26:35Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/NancyFx/Nancy/pulls/1911/commits","review_comments_url":"https://api.github.com/repos/NancyFx/Nancy/pulls/1911/comments","review_comment_url":"https://api.github.com/repos/NancyFx/Nancy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NancyFx/Nancy/issues/1911/comments","statuses_url":"https://api.github.com/repos/NancyFx/Nancy/statuses/cc56a77098eef44dc2b8a6249017809f373f4867","head":{"label":"jonathanfoster:ErrorHandlerContentNegotiation","ref":"ErrorHandlerContentNegotiation","sha":"cc56a77098eef44dc2b8a6249017809f373f4867","user":{"login":"jonathanfoster","id":1923583,"avatar_url":"https://avatars.githubusercontent.com/u/1923583?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanfoster","html_url":"https://github.com/jonathanfoster","followers_url":"https://api.github.com/users/jonathanfoster/followers","following_url":"https://api.github.com/users/jonathanfoster/following{/other_user}","gists_url":"https://api.github.com/users/jonathanfoster/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanfoster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanfoster/subscriptions","organizations_url":"https://api.github.com/users/jonathanfoster/orgs","repos_url":"https://api.github.com/users/jonathanfoster/repos","events_url":"https://api.github.com/users/jonathanfoster/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanfoster/received_events","type":"User","site_admin":false},"repo":{"id":34479876,"name":"Nancy","full_name":"jonathanfoster/Nancy","owner":{"login":"jonathanfoster","id":1923583,"avatar_url":"https://avatars.githubusercontent.com/u/1923583?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanfoster","html_url":"https://github.com/jonathanfoster","followers_url":"https://api.github.com/users/jonathanfoster/followers","following_url":"https://api.github.com/users/jonathanfoster/following{/other_user}","gists_url":"https://api.github.com/users/jonathanfoster/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanfoster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanfoster/subscriptions","organizations_url":"https://api.github.com/users/jonathanfoster/orgs","repos_url":"https://api.github.com/users/jonathanfoster/repos","events_url":"https://api.github.com/users/jonathanfoster/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanfoster/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonathanfoster/Nancy","description":"Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono","fork":true,"url":"https://api.github.com/repos/jonathanfoster/Nancy","forks_url":"https://api.github.com/repos/jonathanfoster/Nancy/forks","keys_url":"https://api.github.com/repos/jonathanfoster/Nancy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonathanfoster/Nancy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonathanfoster/Nancy/teams","hooks_url":"https://api.github.com/repos/jonathanfoster/Nancy/hooks","issue_events_url":"https://api.github.com/repos/jonathanfoster/Nancy/issues/events{/number}","events_url":"https://api.github.com/repos/jonathanfoster/Nancy/events","assignees_url":"https://api.github.com/repos/jonathanfoster/Nancy/assignees{/user}","branches_url":"https://api.github.com/repos/jonathanfoster/Nancy/branches{/branch}","tags_url":"https://api.github.com/repos/jonathanfoster/Nancy/tags","blobs_url":"https://api.github.com/repos/jonathanfoster/Nancy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonathanfoster/Nancy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonathanfoster/Nancy/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonathanfoster/Nancy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonathanfoster/Nancy/statuses/{sha}","languages_url":"https://api.github.com/repos/jonathanfoster/Nancy/languages","stargazers_url":"https://api.github.com/repos/jonathanfoster/Nancy/stargazers","contributors_url":"https://api.github.com/repos/jonathanfoster/Nancy/contributors","subscribers_url":"https://api.github.com/repos/jonathanfoster/Nancy/subscribers","subscription_url":"https://api.github.com/repos/jonathanfoster/Nancy/subscription","commits_url":"https://api.github.com/repos/jonathanfoster/Nancy/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonathanfoster/Nancy/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonathanfoster/Nancy/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonathanfoster/Nancy/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonathanfoster/Nancy/contents/{+path}","compare_url":"https://api.github.com/repos/jonathanfoster/Nancy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonathanfoster/Nancy/merges","archive_url":"https://api.github.com/repos/jonathanfoster/Nancy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonathanfoster/Nancy/downloads","issues_url":"https://api.github.com/repos/jonathanfoster/Nancy/issues{/number}","pulls_url":"https://api.github.com/repos/jonathanfoster/Nancy/pulls{/number}","milestones_url":"https://api.github.com/repos/jonathanfoster/Nancy/milestones{/number}","notifications_url":"https://api.github.com/repos/jonathanfoster/Nancy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonathanfoster/Nancy/labels{/name}","releases_url":"https://api.github.com/repos/jonathanfoster/Nancy/releases{/id}","created_at":"2015-04-23T20:30:12Z","updated_at":"2015-04-25T16:55:48Z","pushed_at":"2015-09-02T13:56:59Z","git_url":"git://github.com/jonathanfoster/Nancy.git","ssh_url":"git@github.com:jonathanfoster/Nancy.git","clone_url":"https://github.com/jonathanfoster/Nancy.git","svn_url":"https://github.com/jonathanfoster/Nancy","homepage":"http://nancyfx.org","size":26942,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"NancyFx:master","ref":"master","sha":"9c91ede64119cdaab83bf85323abe049fac02491","user":{"login":"NancyFx","id":706659,"avatar_url":"https://avatars.githubusercontent.com/u/706659?v=3","gravatar_id":"","url":"https://api.github.com/users/NancyFx","html_url":"https://github.com/NancyFx","followers_url":"https://api.github.com/users/NancyFx/followers","following_url":"https://api.github.com/users/NancyFx/following{/other_user}","gists_url":"https://api.github.com/users/NancyFx/gists{/gist_id}","starred_url":"https://api.github.com/users/NancyFx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NancyFx/subscriptions","organizations_url":"https://api.github.com/users/NancyFx/orgs","repos_url":"https://api.github.com/users/NancyFx/repos","events_url":"https://api.github.com/users/NancyFx/events{/privacy}","received_events_url":"https://api.github.com/users/NancyFx/received_events","type":"Organization","site_admin":false},"repo":{"id":738250,"name":"Nancy","full_name":"NancyFx/Nancy","owner":{"login":"NancyFx","id":706659,"avatar_url":"https://avatars.githubusercontent.com/u/706659?v=3","gravatar_id":"","url":"https://api.github.com/users/NancyFx","html_url":"https://github.com/NancyFx","followers_url":"https://api.github.com/users/NancyFx/followers","following_url":"https://api.github.com/users/NancyFx/following{/other_user}","gists_url":"https://api.github.com/users/NancyFx/gists{/gist_id}","starred_url":"https://api.github.com/users/NancyFx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NancyFx/subscriptions","organizations_url":"https://api.github.com/users/NancyFx/orgs","repos_url":"https://api.github.com/users/NancyFx/repos","events_url":"https://api.github.com/users/NancyFx/events{/privacy}","received_events_url":"https://api.github.com/users/NancyFx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NancyFx/Nancy","description":"Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono","fork":false,"url":"https://api.github.com/repos/NancyFx/Nancy","forks_url":"https://api.github.com/repos/NancyFx/Nancy/forks","keys_url":"https://api.github.com/repos/NancyFx/Nancy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NancyFx/Nancy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NancyFx/Nancy/teams","hooks_url":"https://api.github.com/repos/NancyFx/Nancy/hooks","issue_events_url":"https://api.github.com/repos/NancyFx/Nancy/issues/events{/number}","events_url":"https://api.github.com/repos/NancyFx/Nancy/events","assignees_url":"https://api.github.com/repos/NancyFx/Nancy/assignees{/user}","branches_url":"https://api.github.com/repos/NancyFx/Nancy/branches{/branch}","tags_url":"https://api.github.com/repos/NancyFx/Nancy/tags","blobs_url":"https://api.github.com/repos/NancyFx/Nancy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NancyFx/Nancy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NancyFx/Nancy/git/refs{/sha}","trees_url":"https://api.github.com/repos/NancyFx/Nancy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NancyFx/Nancy/statuses/{sha}","languages_url":"https://api.github.com/repos/NancyFx/Nancy/languages","stargazers_url":"https://api.github.com/repos/NancyFx/Nancy/stargazers","contributors_url":"https://api.github.com/repos/NancyFx/Nancy/contributors","subscribers_url":"https://api.github.com/repos/NancyFx/Nancy/subscribers","subscription_url":"https://api.github.com/repos/NancyFx/Nancy/subscription","commits_url":"https://api.github.com/repos/NancyFx/Nancy/commits{/sha}","git_commits_url":"https://api.github.com/repos/NancyFx/Nancy/git/commits{/sha}","comments_url":"https://api.github.com/repos/NancyFx/Nancy/comments{/number}","issue_comment_url":"https://api.github.com/repos/NancyFx/Nancy/issues/comments{/number}","contents_url":"https://api.github.com/repos/NancyFx/Nancy/contents/{+path}","compare_url":"https://api.github.com/repos/NancyFx/Nancy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NancyFx/Nancy/merges","archive_url":"https://api.github.com/repos/NancyFx/Nancy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NancyFx/Nancy/downloads","issues_url":"https://api.github.com/repos/NancyFx/Nancy/issues{/number}","pulls_url":"https://api.github.com/repos/NancyFx/Nancy/pulls{/number}","milestones_url":"https://api.github.com/repos/NancyFx/Nancy/milestones{/number}","notifications_url":"https://api.github.com/repos/NancyFx/Nancy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NancyFx/Nancy/labels{/name}","releases_url":"https://api.github.com/repos/NancyFx/Nancy/releases{/id}","created_at":"2010-06-24T19:35:22Z","updated_at":"2015-09-10T13:40:36Z","pushed_at":"2015-09-10T11:26:31Z","git_url":"git://github.com/NancyFx/Nancy.git","ssh_url":"git@github.com:NancyFx/Nancy.git","clone_url":"https://github.com/NancyFx/Nancy.git","svn_url":"https://github.com/NancyFx/Nancy","homepage":"http://nancyfx.org","size":40759,"stargazers_count":3267,"watchers_count":3267,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":848,"mirror_url":null,"open_issues_count":154,"forks":848,"open_issues":154,"watchers":3267,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NancyFx/Nancy/pulls/1911"},"html":{"href":"https://github.com/NancyFx/Nancy/pull/1911"},"issue":{"href":"https://api.github.com/repos/NancyFx/Nancy/issues/1911"},"comments":{"href":"https://api.github.com/repos/NancyFx/Nancy/issues/1911/comments"},"review_comments":{"href":"https://api.github.com/repos/NancyFx/Nancy/pulls/1911/comments"},"review_comment":{"href":"https://api.github.com/repos/NancyFx/Nancy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NancyFx/Nancy/pulls/1911/commits"},"statuses":{"href":"https://api.github.com/repos/NancyFx/Nancy/statuses/cc56a77098eef44dc2b8a6249017809f373f4867"}}}}