{"action":"created","issue":{"url":"https://api.github.com/repos/cargomedia/cm/issues/2248","repository_url":"https://api.github.com/repos/cargomedia/cm","labels_url":"https://api.github.com/repos/cargomedia/cm/issues/2248/labels{/name}","comments_url":"https://api.github.com/repos/cargomedia/cm/issues/2248/comments","events_url":"https://api.github.com/repos/cargomedia/cm/issues/2248/events","html_url":"https://github.com/cargomedia/cm/pull/2248","id":164365177,"number":2248,"title":"Janus RPC: invalid session should be warning","user":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cargomedia/cm/labels/ready","name":"ready","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"fvovan","id":2360687,"avatar_url":"https://avatars.githubusercontent.com/u/2360687?v=3","gravatar_id":"","url":"https://api.github.com/users/fvovan","html_url":"https://github.com/fvovan","followers_url":"https://api.github.com/users/fvovan/followers","following_url":"https://api.github.com/users/fvovan/following{/other_user}","gists_url":"https://api.github.com/users/fvovan/gists{/gist_id}","starred_url":"https://api.github.com/users/fvovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvovan/subscriptions","organizations_url":"https://api.github.com/users/fvovan/orgs","repos_url":"https://api.github.com/users/fvovan/repos","events_url":"https://api.github.com/users/fvovan/events{/privacy}","received_events_url":"https://api.github.com/users/fvovan/received_events","type":"User","site_admin":false},"assignees":[{"login":"fvovan","id":2360687,"avatar_url":"https://avatars.githubusercontent.com/u/2360687?v=3","gravatar_id":"","url":"https://api.github.com/users/fvovan","html_url":"https://github.com/fvovan","followers_url":"https://api.github.com/users/fvovan/followers","following_url":"https://api.github.com/users/fvovan/following{/other_user}","gists_url":"https://api.github.com/users/fvovan/gists{/gist_id}","starred_url":"https://api.github.com/users/fvovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvovan/subscriptions","organizations_url":"https://api.github.com/users/fvovan/orgs","repos_url":"https://api.github.com/users/fvovan/repos","events_url":"https://api.github.com/users/fvovan/events{/privacy}","received_events_url":"https://api.github.com/users/fvovan/received_events","type":"User","site_admin":false}],"milestone":null,"comments":19,"created_at":"2016-07-07T17:33:40Z","updated_at":"2016-07-12T13:37:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cargomedia/cm/pulls/2248","html_url":"https://github.com/cargomedia/cm/pull/2248","diff_url":"https://github.com/cargomedia/cm/pull/2248.diff","patch_url":"https://github.com/cargomedia/cm/pull/2248.patch"},"body":"Currently when we receive RPC calls with invalid session information we get this exception:\r\n```php\r\nCM_Exception_Nonexistent: Session `e443d82711136b1668032a1e680cd2ba` does not exist. in /home/example/releases/20160707172200/vendor/cargomedia/cm/library/CM/Session.php on line 35\r\n0. {main} at /home/example/serve/public/index.php line 0\r\n1. CM_Http_Handler->processRequest(CM_Http_Request_Post) at /home/example/releases/20160707172200/public/index.php line 8\r\n2. CM_Http_Response_Abstract->process() at /home/example/releases/20160707172200/vendor/cargomedia/cm/library/CM/Http/Handler.php line 28\r\n3. CM_Http_Response_RPC->_process() at /home/example/releases/20160707172200/vendor/cargomedia/cm/library/CM/Http/Response/Abstract.php line 48\r\n4. CM_Http_Response_Abstract->_runWithCatching(Closure, Closure) at /home/example/releases/20160707172200/vendor/cargomedia/cm/library/CM/Http/Response/RPC.php line 21\r\n5. CM_Http_Response_RPC->{closure}() at /home/example/releases/20160707172200/vendor/cargomedia/cm/library/CM/Http/Response/Abstract.php line 273\r\n6. call_user_func_array([], []) at /home/example/releases/20160707172200/vendor/cargomedia/cm/library/CM/Http/Response/RPC.php line 18\r\n7. [internal function] at line\r\n8. CM_Session->__construct('e443d82711136b1668032a1e680cd2...') at /home/example/releases/20160707172200/vendor/cargomedia/cm/library/CM/Janus/RpcEndpoints.php line 92\r\n```\r\n\r\nThis should be a warning only, as it's based on user input.\r\n\r\nI see two ways to accomplish that:\r\n- A: Catch the exception in the RPC functions, and handle it locally\r\n- B: Add it to the config's `$config->CM_Http_Response_RPC->exceptionsToCatch`\r\n\r\nEither way we should probably introduce a specific exception `CM_Session_UnknownSessionIdException`?\r\n\r\n@tomaszdurka @fvovan wdyt?"},"comment":{"url":"https://api.github.com/repos/cargomedia/cm/issues/comments/232049552","html_url":"https://github.com/cargomedia/cm/pull/2248#issuecomment-232049552","issue_url":"https://api.github.com/repos/cargomedia/cm/issues/2248","id":232049552,"user":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T13:37:50Z","updated_at":"2016-07-12T13:37:50Z","body":"lgtm"}}
{"actor":{"display_login":"njam"}}