{"action":"created","issue":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/751","labels_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/751/labels{/name}","comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/751/comments","events_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/751/events","html_url":"https://github.com/RESTful-Drupal/restful/issues/751","id":118082980,"number":751,"title":"Log exception message in restful_menu_access_callback()","user":{"login":"ademarco","id":153362,"avatar_url":"https://avatars.githubusercontent.com/u/153362?v=3","gravatar_id":"","url":"https://api.github.com/users/ademarco","html_url":"https://github.com/ademarco","followers_url":"https://api.github.com/users/ademarco/followers","following_url":"https://api.github.com/users/ademarco/following{/other_user}","gists_url":"https://api.github.com/users/ademarco/gists{/gist_id}","starred_url":"https://api.github.com/users/ademarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ademarco/subscriptions","organizations_url":"https://api.github.com/users/ademarco/orgs","repos_url":"https://api.github.com/users/ademarco/repos","events_url":"https://api.github.com/users/ademarco/events{/privacy}","received_events_url":"https://api.github.com/users/ademarco/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-20T17:02:28Z","updated_at":"2015-12-14T09:38:23Z","closed_at":"2015-12-14T09:38:23Z","body":"### Problem\r\nWhen checking access to a resource fails due to ```Drupal\\restful\\Exception\\RestfulException``` being caught in ```restful_menu_access_callback()``` developer has not information about what actually happened apart from a not-descriptive ```403```.\r\n\r\n### Solution\r\nLog exception message on:\r\n\r\n```php\r\n  catch (RestfulException $e) {\r\n    // We can get here if the request method is not valid or if no resource can\r\n    // be negotiated.\r\n  }\r\n```\r\n\r\nWhich would become:\r\n\r\n```php\r\n  catch (RestfulException $e) {\r\n    // We can get here if the request method is not valid or if no resource can\r\n    // be negotiated.\r\n    watchdog('restful', $e->getMessage(), array(), WATCHDOG_WARNING);\r\n  }\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/comments/164390046","html_url":"https://github.com/RESTful-Drupal/restful/issues/751#issuecomment-164390046","issue_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/751","id":164390046,"user":{"login":"e0ipso","id":1140906,"avatar_url":"https://avatars.githubusercontent.com/u/1140906?v=3","gravatar_id":"","url":"https://api.github.com/users/e0ipso","html_url":"https://github.com/e0ipso","followers_url":"https://api.github.com/users/e0ipso/followers","following_url":"https://api.github.com/users/e0ipso/following{/other_user}","gists_url":"https://api.github.com/users/e0ipso/gists{/gist_id}","starred_url":"https://api.github.com/users/e0ipso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e0ipso/subscriptions","organizations_url":"https://api.github.com/users/e0ipso/orgs","repos_url":"https://api.github.com/users/e0ipso/repos","events_url":"https://api.github.com/users/e0ipso/events{/privacy}","received_events_url":"https://api.github.com/users/e0ipso/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T09:38:23Z","updated_at":"2015-12-14T09:38:23Z","body":"This was closed and merged in https://github.com/RESTful-Drupal/restful/commit/3d94c6e463b1fe24f7a1311a216b01967e3ef36d."}}