{"action":"created","comment":{"url":"https://api.github.com/repos/cargomedia/cm-janus/pulls/comments/48148669","id":48148669,"diff_hunk":"@@ -69,7 +69,8 @@ PluginStreaming.prototype.subscribe = function(message) {\n     })\n     .catch(function(error) {\n       serviceLocator.get('http-client').detach(plugin);\n-      throw new JanusError.Error('Cannot subscribe: ' + plugin.stream + ' error: ' + error.message, 490, message['transaction']);\n+      var transaction = message['transaction'] || require('../connection').generateTransactionId();","path":"lib/janus/plugin/streaming.js","position":5,"original_position":5,"commit_id":"8da8fb79cb63ef4f7a13ff1c624a3fd9c9c6567d","original_commit_id":"8da8fb79cb63ef4f7a13ff1c624a3fd9c9c6567d","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"body":"Unfortunately we can't reach any other transaction except a random one. @zazabe will it be ok for `janus.js` client if the transaction was not generated on its side?","created_at":"2015-12-21T14:14:04Z","updated_at":"2015-12-21T14:14:04Z","html_url":"https://github.com/cargomedia/cm-janus/pull/112#discussion_r48148669","pull_request_url":"https://api.github.com/repos/cargomedia/cm-janus/pulls/112","_links":{"self":{"href":"https://api.github.com/repos/cargomedia/cm-janus/pulls/comments/48148669"},"html":{"href":"https://github.com/cargomedia/cm-janus/pull/112#discussion_r48148669"},"pull_request":{"href":"https://api.github.com/repos/cargomedia/cm-janus/pulls/112"}}},"pull_request":{"url":"https://api.github.com/repos/cargomedia/cm-janus/pulls/112","id":54255015,"html_url":"https://github.com/cargomedia/cm-janus/pull/112","diff_url":"https://github.com/cargomedia/cm-janus/pull/112.diff","patch_url":"https://github.com/cargomedia/cm-janus/pull/112.patch","issue_url":"https://api.github.com/repos/cargomedia/cm-janus/issues/112","number":112,"state":"open","locked":false,"title":"Error message should refer to a transaction","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"body":"The vendor janus client [only call `onmessage` when the `transaction` id is set](https://github.com/cargomedia/sk/blob/master/library/VR/client-vendor/after-body/04-janus/janus.js#L326), but cm-janus specific error have no reference to a transaction, for example:\r\n\r\n```\r\n{\"janus\":\"error\",\"error\":{\"code\":490,\"reason\":\"Cannot subscribe: Stream{\\\"id\\\":\\\"049626f1-7909-4e52-af74-d60c00f41e95\\\"} error: cm-api error: CM_Exception_NotAllowed. Internal server error\"}}\r\n{\"janus\":\"error\",\"transaction\":\"9KuoI217vK2O\",\"error\":{\"code\":490,\"reason\":\"Invalid plugin\"}}\r\n```\r\n\r\n2 solutions:\r\n- cm-janus send a valid message, with the transaction id\r\n- change the vendor client source code to call the `janus.error` callback if there's no transaction id\r\n\r\nrelated to cargomedia/sk#2507\r\n\r\n@njam fyi\r\n","created_at":"2015-12-21T13:15:30Z","updated_at":"2015-12-21T14:14:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b1c7ede4ab98798086ebee3dfa58e41467cac1f","assignee":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/cargomedia/cm-janus/pulls/112/commits","review_comments_url":"https://api.github.com/repos/cargomedia/cm-janus/pulls/112/comments","review_comment_url":"https://api.github.com/repos/cargomedia/cm-janus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cargomedia/cm-janus/issues/112/comments","statuses_url":"https://api.github.com/repos/cargomedia/cm-janus/statuses/8da8fb79cb63ef4f7a13ff1c624a3fd9c9c6567d","head":{"label":"vogdb:issue-112","ref":"issue-112","sha":"8da8fb79cb63ef4f7a13ff1c624a3fd9c9c6567d","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"repo":{"id":44749606,"name":"cm-janus","full_name":"vogdb/cm-janus","owner":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vogdb/cm-janus","description":"cm/janus bridge","fork":true,"url":"https://api.github.com/repos/vogdb/cm-janus","forks_url":"https://api.github.com/repos/vogdb/cm-janus/forks","keys_url":"https://api.github.com/repos/vogdb/cm-janus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vogdb/cm-janus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vogdb/cm-janus/teams","hooks_url":"https://api.github.com/repos/vogdb/cm-janus/hooks","issue_events_url":"https://api.github.com/repos/vogdb/cm-janus/issues/events{/number}","events_url":"https://api.github.com/repos/vogdb/cm-janus/events","assignees_url":"https://api.github.com/repos/vogdb/cm-janus/assignees{/user}","branches_url":"https://api.github.com/repos/vogdb/cm-janus/branches{/branch}","tags_url":"https://api.github.com/repos/vogdb/cm-janus/tags","blobs_url":"https://api.github.com/repos/vogdb/cm-janus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vogdb/cm-janus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vogdb/cm-janus/git/refs{/sha}","trees_url":"https://api.github.com/repos/vogdb/cm-janus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vogdb/cm-janus/statuses/{sha}","languages_url":"https://api.github.com/repos/vogdb/cm-janus/languages","stargazers_url":"https://api.github.com/repos/vogdb/cm-janus/stargazers","contributors_url":"https://api.github.com/repos/vogdb/cm-janus/contributors","subscribers_url":"https://api.github.com/repos/vogdb/cm-janus/subscribers","subscription_url":"https://api.github.com/repos/vogdb/cm-janus/subscription","commits_url":"https://api.github.com/repos/vogdb/cm-janus/commits{/sha}","git_commits_url":"https://api.github.com/repos/vogdb/cm-janus/git/commits{/sha}","comments_url":"https://api.github.com/repos/vogdb/cm-janus/comments{/number}","issue_comment_url":"https://api.github.com/repos/vogdb/cm-janus/issues/comments{/number}","contents_url":"https://api.github.com/repos/vogdb/cm-janus/contents/{+path}","compare_url":"https://api.github.com/repos/vogdb/cm-janus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vogdb/cm-janus/merges","archive_url":"https://api.github.com/repos/vogdb/cm-janus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vogdb/cm-janus/downloads","issues_url":"https://api.github.com/repos/vogdb/cm-janus/issues{/number}","pulls_url":"https://api.github.com/repos/vogdb/cm-janus/pulls{/number}","milestones_url":"https://api.github.com/repos/vogdb/cm-janus/milestones{/number}","notifications_url":"https://api.github.com/repos/vogdb/cm-janus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vogdb/cm-janus/labels{/name}","releases_url":"https://api.github.com/repos/vogdb/cm-janus/releases{/id}","created_at":"2015-10-22T14:11:13Z","updated_at":"2015-10-28T11:09:07Z","pushed_at":"2015-12-21T14:09:13Z","git_url":"git://github.com/vogdb/cm-janus.git","ssh_url":"git@github.com:vogdb/cm-janus.git","clone_url":"https://github.com/vogdb/cm-janus.git","svn_url":"https://github.com/vogdb/cm-janus","homepage":null,"size":452,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"cargomedia:master","ref":"master","sha":"615909b384091f88081fe6062086d233b37b4f38","user":{"login":"cargomedia","id":1699929,"avatar_url":"https://avatars.githubusercontent.com/u/1699929?v=3","gravatar_id":"","url":"https://api.github.com/users/cargomedia","html_url":"https://github.com/cargomedia","followers_url":"https://api.github.com/users/cargomedia/followers","following_url":"https://api.github.com/users/cargomedia/following{/other_user}","gists_url":"https://api.github.com/users/cargomedia/gists{/gist_id}","starred_url":"https://api.github.com/users/cargomedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cargomedia/subscriptions","organizations_url":"https://api.github.com/users/cargomedia/orgs","repos_url":"https://api.github.com/users/cargomedia/repos","events_url":"https://api.github.com/users/cargomedia/events{/privacy}","received_events_url":"https://api.github.com/users/cargomedia/received_events","type":"Organization","site_admin":false},"repo":{"id":44678874,"name":"cm-janus","full_name":"cargomedia/cm-janus","owner":{"login":"cargomedia","id":1699929,"avatar_url":"https://avatars.githubusercontent.com/u/1699929?v=3","gravatar_id":"","url":"https://api.github.com/users/cargomedia","html_url":"https://github.com/cargomedia","followers_url":"https://api.github.com/users/cargomedia/followers","following_url":"https://api.github.com/users/cargomedia/following{/other_user}","gists_url":"https://api.github.com/users/cargomedia/gists{/gist_id}","starred_url":"https://api.github.com/users/cargomedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cargomedia/subscriptions","organizations_url":"https://api.github.com/users/cargomedia/orgs","repos_url":"https://api.github.com/users/cargomedia/repos","events_url":"https://api.github.com/users/cargomedia/events{/privacy}","received_events_url":"https://api.github.com/users/cargomedia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cargomedia/cm-janus","description":"cm/janus bridge","fork":false,"url":"https://api.github.com/repos/cargomedia/cm-janus","forks_url":"https://api.github.com/repos/cargomedia/cm-janus/forks","keys_url":"https://api.github.com/repos/cargomedia/cm-janus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cargomedia/cm-janus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cargomedia/cm-janus/teams","hooks_url":"https://api.github.com/repos/cargomedia/cm-janus/hooks","issue_events_url":"https://api.github.com/repos/cargomedia/cm-janus/issues/events{/number}","events_url":"https://api.github.com/repos/cargomedia/cm-janus/events","assignees_url":"https://api.github.com/repos/cargomedia/cm-janus/assignees{/user}","branches_url":"https://api.github.com/repos/cargomedia/cm-janus/branches{/branch}","tags_url":"https://api.github.com/repos/cargomedia/cm-janus/tags","blobs_url":"https://api.github.com/repos/cargomedia/cm-janus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cargomedia/cm-janus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cargomedia/cm-janus/git/refs{/sha}","trees_url":"https://api.github.com/repos/cargomedia/cm-janus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cargomedia/cm-janus/statuses/{sha}","languages_url":"https://api.github.com/repos/cargomedia/cm-janus/languages","stargazers_url":"https://api.github.com/repos/cargomedia/cm-janus/stargazers","contributors_url":"https://api.github.com/repos/cargomedia/cm-janus/contributors","subscribers_url":"https://api.github.com/repos/cargomedia/cm-janus/subscribers","subscription_url":"https://api.github.com/repos/cargomedia/cm-janus/subscription","commits_url":"https://api.github.com/repos/cargomedia/cm-janus/commits{/sha}","git_commits_url":"https://api.github.com/repos/cargomedia/cm-janus/git/commits{/sha}","comments_url":"https://api.github.com/repos/cargomedia/cm-janus/comments{/number}","issue_comment_url":"https://api.github.com/repos/cargomedia/cm-janus/issues/comments{/number}","contents_url":"https://api.github.com/repos/cargomedia/cm-janus/contents/{+path}","compare_url":"https://api.github.com/repos/cargomedia/cm-janus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cargomedia/cm-janus/merges","archive_url":"https://api.github.com/repos/cargomedia/cm-janus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cargomedia/cm-janus/downloads","issues_url":"https://api.github.com/repos/cargomedia/cm-janus/issues{/number}","pulls_url":"https://api.github.com/repos/cargomedia/cm-janus/pulls{/number}","milestones_url":"https://api.github.com/repos/cargomedia/cm-janus/milestones{/number}","notifications_url":"https://api.github.com/repos/cargomedia/cm-janus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cargomedia/cm-janus/labels{/name}","releases_url":"https://api.github.com/repos/cargomedia/cm-janus/releases{/id}","created_at":"2015-10-21T13:41:09Z","updated_at":"2015-10-28T10:07:39Z","pushed_at":"2015-12-21T14:09:04Z","git_url":"git://github.com/cargomedia/cm-janus.git","ssh_url":"git@github.com:cargomedia/cm-janus.git","clone_url":"https://github.com/cargomedia/cm-janus.git","svn_url":"https://github.com/cargomedia/cm-janus","homepage":null,"size":475,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":7,"forks":5,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cargomedia/cm-janus/pulls/112"},"html":{"href":"https://github.com/cargomedia/cm-janus/pull/112"},"issue":{"href":"https://api.github.com/repos/cargomedia/cm-janus/issues/112"},"comments":{"href":"https://api.github.com/repos/cargomedia/cm-janus/issues/112/comments"},"review_comments":{"href":"https://api.github.com/repos/cargomedia/cm-janus/pulls/112/comments"},"review_comment":{"href":"https://api.github.com/repos/cargomedia/cm-janus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cargomedia/cm-janus/pulls/112/commits"},"statuses":{"href":"https://api.github.com/repos/cargomedia/cm-janus/statuses/8da8fb79cb63ef4f7a13ff1c624a3fd9c9c6567d"}}}}