{"action":"created","issue":{"url":"https://api.github.com/repos/Quantum179/Stories/issues/7","repository_url":"https://api.github.com/repos/Quantum179/Stories","labels_url":"https://api.github.com/repos/Quantum179/Stories/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Quantum179/Stories/issues/7/comments","events_url":"https://api.github.com/repos/Quantum179/Stories/issues/7/events","html_url":"https://github.com/Quantum179/Stories/issues/7","id":323851868,"node_id":"MDU6SXNzdWUzMjM4NTE4Njg=","number":7,"title":"Error handling","user":{"login":"Quantum179","id":17660563,"node_id":"MDQ6VXNlcjE3NjYwNTYz","avatar_url":"https://avatars3.githubusercontent.com/u/17660563?v=4","gravatar_id":"","url":"https://api.github.com/users/Quantum179","html_url":"https://github.com/Quantum179","followers_url":"https://api.github.com/users/Quantum179/followers","following_url":"https://api.github.com/users/Quantum179/following{/other_user}","gists_url":"https://api.github.com/users/Quantum179/gists{/gist_id}","starred_url":"https://api.github.com/users/Quantum179/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quantum179/subscriptions","organizations_url":"https://api.github.com/users/Quantum179/orgs","repos_url":"https://api.github.com/users/Quantum179/repos","events_url":"https://api.github.com/users/Quantum179/events{/privacy}","received_events_url":"https://api.github.com/users/Quantum179/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Quantum179","id":17660563,"node_id":"MDQ6VXNlcjE3NjYwNTYz","avatar_url":"https://avatars3.githubusercontent.com/u/17660563?v=4","gravatar_id":"","url":"https://api.github.com/users/Quantum179","html_url":"https://github.com/Quantum179","followers_url":"https://api.github.com/users/Quantum179/followers","following_url":"https://api.github.com/users/Quantum179/following{/other_user}","gists_url":"https://api.github.com/users/Quantum179/gists{/gist_id}","starred_url":"https://api.github.com/users/Quantum179/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quantum179/subscriptions","organizations_url":"https://api.github.com/users/Quantum179/orgs","repos_url":"https://api.github.com/users/Quantum179/repos","events_url":"https://api.github.com/users/Quantum179/events{/privacy}","received_events_url":"https://api.github.com/users/Quantum179/received_events","type":"User","site_admin":false},"assignees":[{"login":"Quantum179","id":17660563,"node_id":"MDQ6VXNlcjE3NjYwNTYz","avatar_url":"https://avatars3.githubusercontent.com/u/17660563?v=4","gravatar_id":"","url":"https://api.github.com/users/Quantum179","html_url":"https://github.com/Quantum179","followers_url":"https://api.github.com/users/Quantum179/followers","following_url":"https://api.github.com/users/Quantum179/following{/other_user}","gists_url":"https://api.github.com/users/Quantum179/gists{/gist_id}","starred_url":"https://api.github.com/users/Quantum179/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quantum179/subscriptions","organizations_url":"https://api.github.com/users/Quantum179/orgs","repos_url":"https://api.github.com/users/Quantum179/repos","events_url":"https://api.github.com/users/Quantum179/events{/privacy}","received_events_url":"https://api.github.com/users/Quantum179/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-05-17T02:37:46Z","updated_at":"2018-07-29T14:32:54Z","closed_at":null,"author_association":"OWNER","body":"The server needs to return http code 500 when something is wrong (db is not running, exception throwed, etc). Look for an error middleware who will catches every errors accross the whole api."},"comment":{"url":"https://api.github.com/repos/Quantum179/Stories/issues/comments/408681774","html_url":"https://github.com/Quantum179/Stories/issues/7#issuecomment-408681774","issue_url":"https://api.github.com/repos/Quantum179/Stories/issues/7","id":408681774,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODY4MTc3NA==","user":{"login":"Quantum179","id":17660563,"node_id":"MDQ6VXNlcjE3NjYwNTYz","avatar_url":"https://avatars3.githubusercontent.com/u/17660563?v=4","gravatar_id":"","url":"https://api.github.com/users/Quantum179","html_url":"https://github.com/Quantum179","followers_url":"https://api.github.com/users/Quantum179/followers","following_url":"https://api.github.com/users/Quantum179/following{/other_user}","gists_url":"https://api.github.com/users/Quantum179/gists{/gist_id}","starred_url":"https://api.github.com/users/Quantum179/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quantum179/subscriptions","organizations_url":"https://api.github.com/users/Quantum179/orgs","repos_url":"https://api.github.com/users/Quantum179/repos","events_url":"https://api.github.com/users/Quantum179/events{/privacy}","received_events_url":"https://api.github.com/users/Quantum179/received_events","type":"User","site_admin":false},"created_at":"2018-07-29T14:32:54Z","updated_at":"2018-07-29T14:32:54Z","author_association":"OWNER","body":"The error middleware is ready and can handle expected errors. But mongoose errors are still not handled, R&D how to custom errors returns in mongoose, it can be useful to know what was wrong in the query (duplicated, invalid form, etc). Maybe we can add a global wrapper for all schemas methods to handling errors returned by mongoose."}}
{"actor":{"display_login":"Quantum179"}}