{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails-generate-backend/issues/38","repository_url":"https://api.github.com/repos/balderdashy/sails-generate-backend","labels_url":"https://api.github.com/repos/balderdashy/sails-generate-backend/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails-generate-backend/issues/38/comments","events_url":"https://api.github.com/repos/balderdashy/sails-generate-backend/issues/38/events","html_url":"https://github.com/balderdashy/sails-generate-backend/issues/38","id":213913512,"number":38,"title":"Default responses methods shouldn`t hide errors in their views","user":{"login":"oshatrk","id":23199366,"avatar_url":"https://avatars3.githubusercontent.com/u/23199366?v=3","gravatar_id":"","url":"https://api.github.com/users/oshatrk","html_url":"https://github.com/oshatrk","followers_url":"https://api.github.com/users/oshatrk/followers","following_url":"https://api.github.com/users/oshatrk/following{/other_user}","gists_url":"https://api.github.com/users/oshatrk/gists{/gist_id}","starred_url":"https://api.github.com/users/oshatrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oshatrk/subscriptions","organizations_url":"https://api.github.com/users/oshatrk/orgs","repos_url":"https://api.github.com/users/oshatrk/repos","events_url":"https://api.github.com/users/oshatrk/events{/privacy}","received_events_url":"https://api.github.com/users/oshatrk/received_events","type":"User","site_admin":false},"labels":[{"id":353893182,"url":"https://api.github.com/repos/balderdashy/sails-generate-backend/labels/Waiting%20to%20close","name":"Waiting to close","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-13T22:15:29Z","updated_at":"2017-04-13T23:01:48Z","closed_at":null,"body":"For example, if there is an error in the `500.ejs` view then default serverError() should show this one instead of initial error as it does currently.\r\nIn this case the developer should first fix his/her `500.ejs` to prevent later troubles with it.\r\n\r\nTo resolve issue for ./responses/serverError.js one can correct callback of res.view() with lines like:\r\n```\r\n      else {\r\n        sails.log.warn('res.serverError() :: When attempting to render error page view, an error occured (sending JSON instead).  Details: ', err);\r\n      }\r\n-      return res.jsonx(data);\r\n+      if (process.env.NODE_ENV !== 'production') {\r\n+        return res.jsonx(err);\r\n+      }\r\n+      return res.send(500, \"Internal Server Error\");\r\n}\r\n```\r\n(In this code `data` is replaced with `err`.)\r\n\r\nCallbacks of res.view() and res.guessView() in code of other default response methods should be corrected also."},"comment":{"url":"https://api.github.com/repos/balderdashy/sails-generate-backend/issues/comments/294043319","html_url":"https://github.com/balderdashy/sails-generate-backend/issues/38#issuecomment-294043319","issue_url":"https://api.github.com/repos/balderdashy/sails-generate-backend/issues/38","id":294043319,"user":{"login":"sailsbot","id":14700466,"avatar_url":"https://avatars1.githubusercontent.com/u/14700466?v=3","gravatar_id":"","url":"https://api.github.com/users/sailsbot","html_url":"https://github.com/sailsbot","followers_url":"https://api.github.com/users/sailsbot/followers","following_url":"https://api.github.com/users/sailsbot/following{/other_user}","gists_url":"https://api.github.com/users/sailsbot/gists{/gist_id}","starred_url":"https://api.github.com/users/sailsbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailsbot/subscriptions","organizations_url":"https://api.github.com/users/sailsbot/orgs","repos_url":"https://api.github.com/users/sailsbot/repos","events_url":"https://api.github.com/users/sailsbot/events{/privacy}","received_events_url":"https://api.github.com/users/sailsbot/received_events","type":"User","site_admin":false},"created_at":"2017-04-13T23:01:48Z","updated_at":"2017-04-13T23:01:48Z","body":"@oshatrk,@sailsbot: Hello, I'm a repo bot-- nice to meet you!\n\nIt has been 30 days since there have been any updates or new comments on this page.  If this issue has been resolved, feel free to disregard the rest of this message and simply close the issue if possible.  On the other hand, if you are still waiting on a patch, please post a comment to keep the thread alive (with any new information you can provide).\n\n\n\nIf no further activity occurs on this thread within the next 3 days, the issue will automatically be closed.\n\nThanks so much for your help!"}}
{"actor":{"display_login":"sailsbot"}}