{"action":"created","comment":{"url":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/comments/56169074","id":56169074,"diff_hunk":"@@ -96,9 +98,15 @@ public function pageNotFound($message)\n      *\n      * @see Mouf\\Mvc\\Splash\\Controllers.Http500HandlerInterface::serverError()\n      */\n-    public function serverError(\\Exception $exception)\n+    public function serverError(\\Exception $exception, ServerRequestInterface $request)\n     {\n         $this->exception = $exception;\n+\n+        $acceptType = $request->getHeader('Accept');\n+        if (is_array($acceptType) && count($acceptType) > 0 && strpos($acceptType[0], \"json\") !== false ){\n+            return new JsonResponse([\"error\" => [\"message\" => $exception->getMessage(), \"type\" => \"Exception\", \"trace\" => DEBUG ? $exception->getTraceAsString() : \"\"]]);","path":"src/Mouf/Mvc/Splash/Controllers/HttpErrorsController.php","position":20,"original_position":20,"commit_id":"131636e082cff4c3ce4c758bc06b18f3f31289d8","original_commit_id":"131636e082cff4c3ce4c758bc06b18f3f31289d8","user":{"login":"moufmouf","id":1290952,"avatar_url":"https://avatars.githubusercontent.com/u/1290952?v=3","gravatar_id":"","url":"https://api.github.com/users/moufmouf","html_url":"https://github.com/moufmouf","followers_url":"https://api.github.com/users/moufmouf/followers","following_url":"https://api.github.com/users/moufmouf/following{/other_user}","gists_url":"https://api.github.com/users/moufmouf/gists{/gist_id}","starred_url":"https://api.github.com/users/moufmouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moufmouf/subscriptions","organizations_url":"https://api.github.com/users/moufmouf/orgs","repos_url":"https://api.github.com/users/moufmouf/repos","events_url":"https://api.github.com/users/moufmouf/events{/privacy}","received_events_url":"https://api.github.com/users/moufmouf/received_events","type":"User","site_admin":false},"body":"Est-ce que tu peux retirer la référence en  dur à DEBUG et le changer par la variable de classe `$debugMode`?\r\n\r\nL'idée est de ne jamais mettre de constante en dur dans nos paquets, mais à la place injecter les constantes dans les classes via Mouf (c'est plus souple)","created_at":"2016-03-15T14:13:04Z","updated_at":"2016-03-15T14:13:04Z","html_url":"https://github.com/thecodingmachine/mvc.splash/pull/21#discussion_r56169074","pull_request_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/comments/56169074"},"html":{"href":"https://github.com/thecodingmachine/mvc.splash/pull/21#discussion_r56169074"},"pull_request":{"href":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/21","id":62907343,"html_url":"https://github.com/thecodingmachine/mvc.splash/pull/21","diff_url":"https://github.com/thecodingmachine/mvc.splash/pull/21.diff","patch_url":"https://github.com/thecodingmachine/mvc.splash/pull/21.patch","issue_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/issues/21","number":21,"state":"open","locked":false,"title":"adding request format handling (for json) caution, this request should be merged along with splash-common's one","user":{"login":"nguyenk","id":2227554,"avatar_url":"https://avatars.githubusercontent.com/u/2227554?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenk","html_url":"https://github.com/nguyenk","followers_url":"https://api.github.com/users/nguyenk/followers","following_url":"https://api.github.com/users/nguyenk/following{/other_user}","gists_url":"https://api.github.com/users/nguyenk/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenk/subscriptions","organizations_url":"https://api.github.com/users/nguyenk/orgs","repos_url":"https://api.github.com/users/nguyenk/repos","events_url":"https://api.github.com/users/nguyenk/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenk/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-03-15T13:45:51Z","updated_at":"2016-03-15T14:13:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e898d40ab9c6203f785ccb458858e28c1f19997","assignee":{"login":"moufmouf","id":1290952,"avatar_url":"https://avatars.githubusercontent.com/u/1290952?v=3","gravatar_id":"","url":"https://api.github.com/users/moufmouf","html_url":"https://github.com/moufmouf","followers_url":"https://api.github.com/users/moufmouf/followers","following_url":"https://api.github.com/users/moufmouf/following{/other_user}","gists_url":"https://api.github.com/users/moufmouf/gists{/gist_id}","starred_url":"https://api.github.com/users/moufmouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moufmouf/subscriptions","organizations_url":"https://api.github.com/users/moufmouf/orgs","repos_url":"https://api.github.com/users/moufmouf/repos","events_url":"https://api.github.com/users/moufmouf/events{/privacy}","received_events_url":"https://api.github.com/users/moufmouf/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/21/commits","review_comments_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/21/comments","review_comment_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/issues/21/comments","statuses_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/statuses/131636e082cff4c3ce4c758bc06b18f3f31289d8","head":{"label":"nguyenk:7.0","ref":"7.0","sha":"131636e082cff4c3ce4c758bc06b18f3f31289d8","user":{"login":"nguyenk","id":2227554,"avatar_url":"https://avatars.githubusercontent.com/u/2227554?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenk","html_url":"https://github.com/nguyenk","followers_url":"https://api.github.com/users/nguyenk/followers","following_url":"https://api.github.com/users/nguyenk/following{/other_user}","gists_url":"https://api.github.com/users/nguyenk/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenk/subscriptions","organizations_url":"https://api.github.com/users/nguyenk/orgs","repos_url":"https://api.github.com/users/nguyenk/repos","events_url":"https://api.github.com/users/nguyenk/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenk/received_events","type":"User","site_admin":false},"repo":{"id":53947759,"name":"mvc.splash","full_name":"nguyenk/mvc.splash","owner":{"login":"nguyenk","id":2227554,"avatar_url":"https://avatars.githubusercontent.com/u/2227554?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenk","html_url":"https://github.com/nguyenk","followers_url":"https://api.github.com/users/nguyenk/followers","following_url":"https://api.github.com/users/nguyenk/following{/other_user}","gists_url":"https://api.github.com/users/nguyenk/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenk/subscriptions","organizations_url":"https://api.github.com/users/nguyenk/orgs","repos_url":"https://api.github.com/users/nguyenk/repos","events_url":"https://api.github.com/users/nguyenk/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nguyenk/mvc.splash","description":"A MVC framework deeply integrated with Mouf","fork":true,"url":"https://api.github.com/repos/nguyenk/mvc.splash","forks_url":"https://api.github.com/repos/nguyenk/mvc.splash/forks","keys_url":"https://api.github.com/repos/nguyenk/mvc.splash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nguyenk/mvc.splash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nguyenk/mvc.splash/teams","hooks_url":"https://api.github.com/repos/nguyenk/mvc.splash/hooks","issue_events_url":"https://api.github.com/repos/nguyenk/mvc.splash/issues/events{/number}","events_url":"https://api.github.com/repos/nguyenk/mvc.splash/events","assignees_url":"https://api.github.com/repos/nguyenk/mvc.splash/assignees{/user}","branches_url":"https://api.github.com/repos/nguyenk/mvc.splash/branches{/branch}","tags_url":"https://api.github.com/repos/nguyenk/mvc.splash/tags","blobs_url":"https://api.github.com/repos/nguyenk/mvc.splash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nguyenk/mvc.splash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nguyenk/mvc.splash/git/refs{/sha}","trees_url":"https://api.github.com/repos/nguyenk/mvc.splash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nguyenk/mvc.splash/statuses/{sha}","languages_url":"https://api.github.com/repos/nguyenk/mvc.splash/languages","stargazers_url":"https://api.github.com/repos/nguyenk/mvc.splash/stargazers","contributors_url":"https://api.github.com/repos/nguyenk/mvc.splash/contributors","subscribers_url":"https://api.github.com/repos/nguyenk/mvc.splash/subscribers","subscription_url":"https://api.github.com/repos/nguyenk/mvc.splash/subscription","commits_url":"https://api.github.com/repos/nguyenk/mvc.splash/commits{/sha}","git_commits_url":"https://api.github.com/repos/nguyenk/mvc.splash/git/commits{/sha}","comments_url":"https://api.github.com/repos/nguyenk/mvc.splash/comments{/number}","issue_comment_url":"https://api.github.com/repos/nguyenk/mvc.splash/issues/comments{/number}","contents_url":"https://api.github.com/repos/nguyenk/mvc.splash/contents/{+path}","compare_url":"https://api.github.com/repos/nguyenk/mvc.splash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nguyenk/mvc.splash/merges","archive_url":"https://api.github.com/repos/nguyenk/mvc.splash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nguyenk/mvc.splash/downloads","issues_url":"https://api.github.com/repos/nguyenk/mvc.splash/issues{/number}","pulls_url":"https://api.github.com/repos/nguyenk/mvc.splash/pulls{/number}","milestones_url":"https://api.github.com/repos/nguyenk/mvc.splash/milestones{/number}","notifications_url":"https://api.github.com/repos/nguyenk/mvc.splash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nguyenk/mvc.splash/labels{/name}","releases_url":"https://api.github.com/repos/nguyenk/mvc.splash/releases{/id}","deployments_url":"https://api.github.com/repos/nguyenk/mvc.splash/deployments","created_at":"2016-03-15T13:41:53Z","updated_at":"2016-03-15T13:41:54Z","pushed_at":"2016-03-15T13:45:34Z","git_url":"git://github.com/nguyenk/mvc.splash.git","ssh_url":"git@github.com:nguyenk/mvc.splash.git","clone_url":"https://github.com/nguyenk/mvc.splash.git","svn_url":"https://github.com/nguyenk/mvc.splash","homepage":null,"size":1114,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"7.0"}},"base":{"label":"thecodingmachine:7.0","ref":"7.0","sha":"9f9b4d218185a71b779beb78c30936ea7866831d","user":{"login":"thecodingmachine","id":1847918,"avatar_url":"https://avatars.githubusercontent.com/u/1847918?v=3","gravatar_id":"","url":"https://api.github.com/users/thecodingmachine","html_url":"https://github.com/thecodingmachine","followers_url":"https://api.github.com/users/thecodingmachine/followers","following_url":"https://api.github.com/users/thecodingmachine/following{/other_user}","gists_url":"https://api.github.com/users/thecodingmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/thecodingmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecodingmachine/subscriptions","organizations_url":"https://api.github.com/users/thecodingmachine/orgs","repos_url":"https://api.github.com/users/thecodingmachine/repos","events_url":"https://api.github.com/users/thecodingmachine/events{/privacy}","received_events_url":"https://api.github.com/users/thecodingmachine/received_events","type":"Organization","site_admin":false},"repo":{"id":5646910,"name":"mvc.splash","full_name":"thecodingmachine/mvc.splash","owner":{"login":"thecodingmachine","id":1847918,"avatar_url":"https://avatars.githubusercontent.com/u/1847918?v=3","gravatar_id":"","url":"https://api.github.com/users/thecodingmachine","html_url":"https://github.com/thecodingmachine","followers_url":"https://api.github.com/users/thecodingmachine/followers","following_url":"https://api.github.com/users/thecodingmachine/following{/other_user}","gists_url":"https://api.github.com/users/thecodingmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/thecodingmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecodingmachine/subscriptions","organizations_url":"https://api.github.com/users/thecodingmachine/orgs","repos_url":"https://api.github.com/users/thecodingmachine/repos","events_url":"https://api.github.com/users/thecodingmachine/events{/privacy}","received_events_url":"https://api.github.com/users/thecodingmachine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thecodingmachine/mvc.splash","description":"A MVC framework deeply integrated with Mouf","fork":false,"url":"https://api.github.com/repos/thecodingmachine/mvc.splash","forks_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/forks","keys_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/teams","hooks_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/hooks","issue_events_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/issues/events{/number}","events_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/events","assignees_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/assignees{/user}","branches_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/branches{/branch}","tags_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/tags","blobs_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/git/refs{/sha}","trees_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/statuses/{sha}","languages_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/languages","stargazers_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/stargazers","contributors_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/contributors","subscribers_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/subscribers","subscription_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/subscription","commits_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/commits{/sha}","git_commits_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/git/commits{/sha}","comments_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/comments{/number}","issue_comment_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/issues/comments{/number}","contents_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/contents/{+path}","compare_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/merges","archive_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/downloads","issues_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/issues{/number}","pulls_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls{/number}","milestones_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/milestones{/number}","notifications_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/labels{/name}","releases_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/releases{/id}","deployments_url":"https://api.github.com/repos/thecodingmachine/mvc.splash/deployments","created_at":"2012-09-02T08:37:24Z","updated_at":"2016-02-25T08:41:36Z","pushed_at":"2016-03-15T13:45:51Z","git_url":"git://github.com/thecodingmachine/mvc.splash.git","ssh_url":"git@github.com:thecodingmachine/mvc.splash.git","clone_url":"https://github.com/thecodingmachine/mvc.splash.git","svn_url":"https://github.com/thecodingmachine/mvc.splash","homepage":null,"size":1112,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":7,"forks":10,"open_issues":7,"watchers":0,"default_branch":"7.0"}},"_links":{"self":{"href":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/21"},"html":{"href":"https://github.com/thecodingmachine/mvc.splash/pull/21"},"issue":{"href":"https://api.github.com/repos/thecodingmachine/mvc.splash/issues/21"},"comments":{"href":"https://api.github.com/repos/thecodingmachine/mvc.splash/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thecodingmachine/mvc.splash/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/thecodingmachine/mvc.splash/statuses/131636e082cff4c3ce4c758bc06b18f3f31289d8"}}}}