{"action":"created","comment":{"url":"https://api.github.com/repos/vatesfr/mini-safe/pulls/comments/224753385","pull_request_review_id":164201597,"id":224753385,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDc1MzM4NQ==","diff_hunk":"@@ -68,16 +77,22 @@ app.use(async (ctx, next) => {\n \n   const request = parse(await getStream(ctx.req));\n   if (request.type !== \"request\") {\n-    throw new Error(\"invalid JSON-RPC message, expected request\");\n+    throw new InvalidRequest(\"invalid JSON-RPC message, expected request\");\n   }\n \n-  const method = METHODS[request.method];\n-  if (method === undefined) {\n-    throw new Error(`could not find method ${request.method}`);\n+  try {\n+    const method = METHODS[request.method];\n+    if (method === undefined) {\n+      throw new MethodNotFound(`could not find method ${request.method}`);","path":"packages/server/main.js","position":54,"original_position":54,"commit_id":"180ed8183c5f66ff6cebb5c26b76ba6823ed7a66","original_commit_id":"180ed8183c5f66ff6cebb5c26b76ba6823ed7a66","user":{"login":"julien-f","id":298721,"node_id":"MDQ6VXNlcjI5ODcyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/298721?v=4","gravatar_id":"","url":"https://api.github.com/users/julien-f","html_url":"https://github.com/julien-f","followers_url":"https://api.github.com/users/julien-f/followers","following_url":"https://api.github.com/users/julien-f/following{/other_user}","gists_url":"https://api.github.com/users/julien-f/gists{/gist_id}","starred_url":"https://api.github.com/users/julien-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julien-f/subscriptions","organizations_url":"https://api.github.com/users/julien-f/orgs","repos_url":"https://api.github.com/users/julien-f/repos","events_url":"https://api.github.com/users/julien-f/events{/privacy}","received_events_url":"https://api.github.com/users/julien-f/received_events","type":"User","site_admin":false},"body":"That's not how it should be used, please check the documentation.","created_at":"2018-10-12T11:27:35Z","updated_at":"2018-10-12T11:27:35Z","html_url":"https://github.com/vatesfr/mini-safe/pull/6#discussion_r224753385","pull_request_url":"https://api.github.com/repos/vatesfr/mini-safe/pulls/6","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/vatesfr/mini-safe/pulls/comments/224753385"},"html":{"href":"https://github.com/vatesfr/mini-safe/pull/6#discussion_r224753385"},"pull_request":{"href":"https://api.github.com/repos/vatesfr/mini-safe/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/vatesfr/mini-safe/pulls/6","id":222415576,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNDE1NTc2","html_url":"https://github.com/vatesfr/mini-safe/pull/6","diff_url":"https://github.com/vatesfr/mini-safe/pull/6.diff","patch_url":"https://github.com/vatesfr/mini-safe/pull/6.patch","issue_url":"https://api.github.com/repos/vatesfr/mini-safe/issues/6","number":6,"state":"open","locked":false,"title":"server: error management (jrpc protocol) ","user":{"login":"heafalan","id":26812190,"node_id":"MDQ6VXNlcjI2ODEyMTkw","avatar_url":"https://avatars2.githubusercontent.com/u/26812190?v=4","gravatar_id":"","url":"https://api.github.com/users/heafalan","html_url":"https://github.com/heafalan","followers_url":"https://api.github.com/users/heafalan/followers","following_url":"https://api.github.com/users/heafalan/following{/other_user}","gists_url":"https://api.github.com/users/heafalan/gists{/gist_id}","starred_url":"https://api.github.com/users/heafalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heafalan/subscriptions","organizations_url":"https://api.github.com/users/heafalan/orgs","repos_url":"https://api.github.com/users/heafalan/repos","events_url":"https://api.github.com/users/heafalan/events{/privacy}","received_events_url":"https://api.github.com/users/heafalan/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-12T10:06:35Z","updated_at":"2018-10-12T11:27:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2dc7de0c9b05f9914bbad36fd7ddcc8ff7c733f1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vatesfr/mini-safe/pulls/6/commits","review_comments_url":"https://api.github.com/repos/vatesfr/mini-safe/pulls/6/comments","review_comment_url":"https://api.github.com/repos/vatesfr/mini-safe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vatesfr/mini-safe/issues/6/comments","statuses_url":"https://api.github.com/repos/vatesfr/mini-safe/statuses/180ed8183c5f66ff6cebb5c26b76ba6823ed7a66","head":{"label":"heafalan:errors-jrpc","ref":"errors-jrpc","sha":"180ed8183c5f66ff6cebb5c26b76ba6823ed7a66","user":{"login":"heafalan","id":26812190,"node_id":"MDQ6VXNlcjI2ODEyMTkw","avatar_url":"https://avatars2.githubusercontent.com/u/26812190?v=4","gravatar_id":"","url":"https://api.github.com/users/heafalan","html_url":"https://github.com/heafalan","followers_url":"https://api.github.com/users/heafalan/followers","following_url":"https://api.github.com/users/heafalan/following{/other_user}","gists_url":"https://api.github.com/users/heafalan/gists{/gist_id}","starred_url":"https://api.github.com/users/heafalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heafalan/subscriptions","organizations_url":"https://api.github.com/users/heafalan/orgs","repos_url":"https://api.github.com/users/heafalan/repos","events_url":"https://api.github.com/users/heafalan/events{/privacy}","received_events_url":"https://api.github.com/users/heafalan/received_events","type":"User","site_admin":false},"repo":{"id":152383465,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIzODM0NjU=","name":"mini-safe","full_name":"heafalan/mini-safe","private":false,"owner":{"login":"heafalan","id":26812190,"node_id":"MDQ6VXNlcjI2ODEyMTkw","avatar_url":"https://avatars2.githubusercontent.com/u/26812190?v=4","gravatar_id":"","url":"https://api.github.com/users/heafalan","html_url":"https://github.com/heafalan","followers_url":"https://api.github.com/users/heafalan/followers","following_url":"https://api.github.com/users/heafalan/following{/other_user}","gists_url":"https://api.github.com/users/heafalan/gists{/gist_id}","starred_url":"https://api.github.com/users/heafalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heafalan/subscriptions","organizations_url":"https://api.github.com/users/heafalan/orgs","repos_url":"https://api.github.com/users/heafalan/repos","events_url":"https://api.github.com/users/heafalan/events{/privacy}","received_events_url":"https://api.github.com/users/heafalan/received_events","type":"User","site_admin":false},"html_url":"https://github.com/heafalan/mini-safe","description":null,"fork":true,"url":"https://api.github.com/repos/heafalan/mini-safe","forks_url":"https://api.github.com/repos/heafalan/mini-safe/forks","keys_url":"https://api.github.com/repos/heafalan/mini-safe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heafalan/mini-safe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heafalan/mini-safe/teams","hooks_url":"https://api.github.com/repos/heafalan/mini-safe/hooks","issue_events_url":"https://api.github.com/repos/heafalan/mini-safe/issues/events{/number}","events_url":"https://api.github.com/repos/heafalan/mini-safe/events","assignees_url":"https://api.github.com/repos/heafalan/mini-safe/assignees{/user}","branches_url":"https://api.github.com/repos/heafalan/mini-safe/branches{/branch}","tags_url":"https://api.github.com/repos/heafalan/mini-safe/tags","blobs_url":"https://api.github.com/repos/heafalan/mini-safe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heafalan/mini-safe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heafalan/mini-safe/git/refs{/sha}","trees_url":"https://api.github.com/repos/heafalan/mini-safe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heafalan/mini-safe/statuses/{sha}","languages_url":"https://api.github.com/repos/heafalan/mini-safe/languages","stargazers_url":"https://api.github.com/repos/heafalan/mini-safe/stargazers","contributors_url":"https://api.github.com/repos/heafalan/mini-safe/contributors","subscribers_url":"https://api.github.com/repos/heafalan/mini-safe/subscribers","subscription_url":"https://api.github.com/repos/heafalan/mini-safe/subscription","commits_url":"https://api.github.com/repos/heafalan/mini-safe/commits{/sha}","git_commits_url":"https://api.github.com/repos/heafalan/mini-safe/git/commits{/sha}","comments_url":"https://api.github.com/repos/heafalan/mini-safe/comments{/number}","issue_comment_url":"https://api.github.com/repos/heafalan/mini-safe/issues/comments{/number}","contents_url":"https://api.github.com/repos/heafalan/mini-safe/contents/{+path}","compare_url":"https://api.github.com/repos/heafalan/mini-safe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heafalan/mini-safe/merges","archive_url":"https://api.github.com/repos/heafalan/mini-safe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heafalan/mini-safe/downloads","issues_url":"https://api.github.com/repos/heafalan/mini-safe/issues{/number}","pulls_url":"https://api.github.com/repos/heafalan/mini-safe/pulls{/number}","milestones_url":"https://api.github.com/repos/heafalan/mini-safe/milestones{/number}","notifications_url":"https://api.github.com/repos/heafalan/mini-safe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heafalan/mini-safe/labels{/name}","releases_url":"https://api.github.com/repos/heafalan/mini-safe/releases{/id}","deployments_url":"https://api.github.com/repos/heafalan/mini-safe/deployments","created_at":"2018-10-10T07:46:52Z","updated_at":"2018-10-10T07:46:54Z","pushed_at":"2018-10-12T10:04:41Z","git_url":"git://github.com/heafalan/mini-safe.git","ssh_url":"git@github.com:heafalan/mini-safe.git","clone_url":"https://github.com/heafalan/mini-safe.git","svn_url":"https://github.com/heafalan/mini-safe","homepage":null,"size":161,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vatesfr:master","ref":"master","sha":"1fa9a7d1cb6625dc5ceb865aec1e5efdbaaeec5e","user":{"login":"vatesfr","id":2064170,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjQxNzA=","avatar_url":"https://avatars2.githubusercontent.com/u/2064170?v=4","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"repo":{"id":150388472,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAzODg0NzI=","name":"mini-safe","full_name":"vatesfr/mini-safe","private":false,"owner":{"login":"vatesfr","id":2064170,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjQxNzA=","avatar_url":"https://avatars2.githubusercontent.com/u/2064170?v=4","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/vatesfr/mini-safe","description":null,"fork":false,"url":"https://api.github.com/repos/vatesfr/mini-safe","forks_url":"https://api.github.com/repos/vatesfr/mini-safe/forks","keys_url":"https://api.github.com/repos/vatesfr/mini-safe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vatesfr/mini-safe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vatesfr/mini-safe/teams","hooks_url":"https://api.github.com/repos/vatesfr/mini-safe/hooks","issue_events_url":"https://api.github.com/repos/vatesfr/mini-safe/issues/events{/number}","events_url":"https://api.github.com/repos/vatesfr/mini-safe/events","assignees_url":"https://api.github.com/repos/vatesfr/mini-safe/assignees{/user}","branches_url":"https://api.github.com/repos/vatesfr/mini-safe/branches{/branch}","tags_url":"https://api.github.com/repos/vatesfr/mini-safe/tags","blobs_url":"https://api.github.com/repos/vatesfr/mini-safe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vatesfr/mini-safe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vatesfr/mini-safe/git/refs{/sha}","trees_url":"https://api.github.com/repos/vatesfr/mini-safe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vatesfr/mini-safe/statuses/{sha}","languages_url":"https://api.github.com/repos/vatesfr/mini-safe/languages","stargazers_url":"https://api.github.com/repos/vatesfr/mini-safe/stargazers","contributors_url":"https://api.github.com/repos/vatesfr/mini-safe/contributors","subscribers_url":"https://api.github.com/repos/vatesfr/mini-safe/subscribers","subscription_url":"https://api.github.com/repos/vatesfr/mini-safe/subscription","commits_url":"https://api.github.com/repos/vatesfr/mini-safe/commits{/sha}","git_commits_url":"https://api.github.com/repos/vatesfr/mini-safe/git/commits{/sha}","comments_url":"https://api.github.com/repos/vatesfr/mini-safe/comments{/number}","issue_comment_url":"https://api.github.com/repos/vatesfr/mini-safe/issues/comments{/number}","contents_url":"https://api.github.com/repos/vatesfr/mini-safe/contents/{+path}","compare_url":"https://api.github.com/repos/vatesfr/mini-safe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vatesfr/mini-safe/merges","archive_url":"https://api.github.com/repos/vatesfr/mini-safe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vatesfr/mini-safe/downloads","issues_url":"https://api.github.com/repos/vatesfr/mini-safe/issues{/number}","pulls_url":"https://api.github.com/repos/vatesfr/mini-safe/pulls{/number}","milestones_url":"https://api.github.com/repos/vatesfr/mini-safe/milestones{/number}","notifications_url":"https://api.github.com/repos/vatesfr/mini-safe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vatesfr/mini-safe/labels{/name}","releases_url":"https://api.github.com/repos/vatesfr/mini-safe/releases{/id}","deployments_url":"https://api.github.com/repos/vatesfr/mini-safe/deployments","created_at":"2018-09-26T07:47:02Z","updated_at":"2018-10-10T07:33:54Z","pushed_at":"2018-10-12T10:11:28Z","git_url":"git://github.com/vatesfr/mini-safe.git","ssh_url":"git@github.com:vatesfr/mini-safe.git","clone_url":"https://github.com/vatesfr/mini-safe.git","svn_url":"https://github.com/vatesfr/mini-safe","homepage":null,"size":154,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vatesfr/mini-safe/pulls/6"},"html":{"href":"https://github.com/vatesfr/mini-safe/pull/6"},"issue":{"href":"https://api.github.com/repos/vatesfr/mini-safe/issues/6"},"comments":{"href":"https://api.github.com/repos/vatesfr/mini-safe/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/vatesfr/mini-safe/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/vatesfr/mini-safe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vatesfr/mini-safe/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/vatesfr/mini-safe/statuses/180ed8183c5f66ff6cebb5c26b76ba6823ed7a66"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"julien-f"}}