{"action":"opened","issue":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/653","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/653/comments","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/653/events","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/653","id":92637489,"number":653,"title":"Empty Location Object crash server","user":{"login":"Maddis1337","id":1409100,"avatar_url":"https://avatars.githubusercontent.com/u/1409100?v=3","gravatar_id":"","url":"https://api.github.com/users/Maddis1337","html_url":"https://github.com/Maddis1337","followers_url":"https://api.github.com/users/Maddis1337/followers","following_url":"https://api.github.com/users/Maddis1337/following{/other_user}","gists_url":"https://api.github.com/users/Maddis1337/gists{/gist_id}","starred_url":"https://api.github.com/users/Maddis1337/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maddis1337/subscriptions","organizations_url":"https://api.github.com/users/Maddis1337/orgs","repos_url":"https://api.github.com/users/Maddis1337/repos","events_url":"https://api.github.com/users/Maddis1337/events{/privacy}","received_events_url":"https://api.github.com/users/Maddis1337/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-02T13:28:39Z","updated_at":"2015-07-02T13:28:39Z","closed_at":null,"body":"It's pretty simple, we have a PUT request on an object which has a geolocation property. If I call it with an empty object, the server will crash!\r\n\r\n## Stacktrace:\r\n\r\n```     Uncaught AssertionError: lat must be a number when creating a GeoPoint\r\n      at new GeoPoint (PATH/node_modules/loopback-datasource-juggler/lib/geo.js:152:3)\r\n      at GeoPoint (PATH/node_modules/loopback-datasource-juggler/lib/geo.js:125:12)\r\n      at ModelConstructor.Object.defineProperty.set [as location] (PATH/node_modules/loopback-datasource-juggler/lib/model-builder.js:460:81)\r\n      at ModelConstructor.setAttribute (PATH/node_modules/loopback-datasource-juggler/lib/dao.js:2060:14)\r\n      at ModelConstructor.setAttributes (PATH/node_modules/loopback-datasource-juggler/lib/dao.js:2093:10)\r\n      at PATH/node_modules/loopback-datasource-juggler/lib/dao.js:2209:10\r\n      at PATH/node_modules/loopback-datasource-juggler/lib/observer.js:106:23\r\n      at PATH/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:49:16\r\n      at PATH/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:263:32\r\n      at PATH/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:40:16\r\n      at event (PATH/node_modules/loopback-ds-timestamp-mixin/time-stamp.js:28:5)\r\n      at notifySingleObserver (PATH/node_modules/loopback-datasource-juggler/lib/observer.js:98:22)\r\n      at PATH/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:162:20\r\n      at iterate (PATH/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:256:13)\r\n      at process._tickDomainCallback (node.js:381:11)\r\n      at process.<anonymous> (PATH/node_modules/loopback/node_modules/continuation-local-storage/node_modules/async-listener/index.js:19:15)```"}}