{"action":"created","issue":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/870","labels_url":"https://api.github.com/repos/keystonejs/keystone/issues/870/labels{/name}","comments_url":"https://api.github.com/repos/keystonejs/keystone/issues/870/comments","events_url":"https://api.github.com/repos/keystonejs/keystone/issues/870/events","html_url":"https://github.com/keystonejs/keystone/pull/870","id":53581603,"number":870,"title":"Log mongoose validation errors generated during createItems","user":{"login":"webteckie","id":5872515,"avatar_url":"https://avatars.githubusercontent.com/u/5872515?v=3","gravatar_id":"","url":"https://api.github.com/users/webteckie","html_url":"https://github.com/webteckie","followers_url":"https://api.github.com/users/webteckie/followers","following_url":"https://api.github.com/users/webteckie/following{/other_user}","gists_url":"https://api.github.com/users/webteckie/gists{/gist_id}","starred_url":"https://api.github.com/users/webteckie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webteckie/subscriptions","organizations_url":"https://api.github.com/users/webteckie/orgs","repos_url":"https://api.github.com/users/webteckie/repos","events_url":"https://api.github.com/users/webteckie/events{/privacy}","received_events_url":"https://api.github.com/users/webteckie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-07T00:21:03Z","updated_at":"2015-01-07T12:53:25Z","closed_at":"2015-01-07T12:51:47Z","pull_request":{"url":"https://api.github.com/repos/keystonejs/keystone/pulls/870","html_url":"https://github.com/keystonejs/keystone/pull/870","diff_url":"https://github.com/keystonejs/keystone/pull/870.diff","patch_url":"https://github.com/keystonejs/keystone/pull/870.patch"},"body":"Addresses #868 \r\n\r\nWithout the changes and if there is a mongoose validation error I get the following:\r\n\r\n    ------------------------------------------------\r\n    An error occurred applying updates, bailing on Keystone init.\r\n\r\n    Error details:\r\n\r\nWith the changes and if there is a mongoose validation error I get something like the following, which is a huge help in troubleshooting:\r\n\r\n    { [ValidationError: Validation failed]\r\n      message: 'Validation failed',\r\n      name: 'ValidationError',\r\n      errors:\r\n       { startTime:\r\n          { [ValidatorError: Path `startTime` is required.]\r\n            message: 'Path `startTime` is required.',\r\n            name: 'ValidatorError',\r\n            path: 'startTime',\r\n            type: 'required',\r\n            value: undefined } },\r\n      model: 'Event',\r\n      data:\r\n       { name: 'Test Booking 1',\r\n         status: 'pending',\r\n         endTime:\r\n          { _isAMomentObject: true,\r\n            _isUTC: false,\r\n            _pf: [Object],\r\n            _locale: [Object],\r\n            _d: Tue Jan 06 2015 19:09:37 GMT-0500 (Eastern Standard Time) },\r\n         __ref: 'Event_1',\r\n         __doc:\r\n          { endTime: Tue Jan 06 2015 19:09:37 GMT-0500 (Eastern Standard Time),\r\n            name: 'Test Booking 1',\r\n            type: 'none',\r\n            repeat: 'none',\r\n            status: 'pending',\r\n            guests: [],\r\n            allDay: false,\r\n            listName: 'Event',\r\n            _id: 54ac7943a2751ad02b12ed57 } } }"},"comment":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/comments/69017733","html_url":"https://github.com/keystonejs/keystone/pull/870#issuecomment-69017733","issue_url":"https://api.github.com/repos/keystonejs/keystone/issues/870","id":69017733,"user":{"login":"JedWatson","id":872310,"avatar_url":"https://avatars.githubusercontent.com/u/872310?v=3","gravatar_id":"","url":"https://api.github.com/users/JedWatson","html_url":"https://github.com/JedWatson","followers_url":"https://api.github.com/users/JedWatson/followers","following_url":"https://api.github.com/users/JedWatson/following{/other_user}","gists_url":"https://api.github.com/users/JedWatson/gists{/gist_id}","starred_url":"https://api.github.com/users/JedWatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JedWatson/subscriptions","organizations_url":"https://api.github.com/users/JedWatson/orgs","repos_url":"https://api.github.com/users/JedWatson/repos","events_url":"https://api.github.com/users/JedWatson/events{/privacy}","received_events_url":"https://api.github.com/users/JedWatson/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T12:53:25Z","updated_at":"2015-01-07T12:53:25Z","body":"I think this change looks good, I've merged it so we can throw some more cases at it."}}