{"pull_request":{"user":{"id":301677,"login":"richmarr","url":"https://api.github.com/users/richmarr","avatar_url":"https://secure.gravatar.com/avatar/f6a2c52186aab6bbcf642a565a5f5616?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f6a2c52186aab6bbcf642a565a5f5616"},"title":"Trying to save an invalid object is a dead-end","merged_at":null,"created_at":"2011-12-21T10:02:34Z","review_comments":0,"updated_at":"2011-12-21T10:02:34Z","state":"open","id":618436,"patch_url":"https://github.com/flatiron/resourceful/pull/34.patch","closed_at":null,"deletions":1,"html_url":"https://github.com/flatiron/resourceful/pull/34","mergeable":false,"issue_url":"https://github.com/flatiron/resourceful/issues/34","base":{"ref":"02fff1b774ad86bdba54ea38a3e69c9dbc87d5aa","user":{"id":624259,"login":"flatiron","url":"https://api.github.com/users/flatiron","avatar_url":"https://secure.gravatar.com/avatar/09088668c649256cb1f244ed326f6ec8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"09088668c649256cb1f244ed326f6ec8"},"sha":"02fff1b774ad86bdba54ea38a3e69c9dbc87d5aa","repo":{"git_url":"git://github.com/flatiron/resourceful.git","open_issues":15,"watchers":61,"created_at":"2011-09-09T01:42:16Z","fork":false,"updated_at":"2011-12-21T02:42:13Z","id":2352769,"language":"JavaScript","html_url":"https://github.com/flatiron/resourceful","name":"resourceful","description":"A storage agnostic resource-oriented ODM for building prototypical models with validation and sanitization.","master_branch":null,"url":"https://api.github.com/repos/flatiron/resourceful","clone_url":"https://github.com/flatiron/resourceful.git","forks":14,"ssh_url":"git@github.com:flatiron/resourceful.git","pushed_at":"2011-12-20T21:32:07Z","owner":{"id":624259,"login":"flatiron","url":"https://api.github.com/users/flatiron","avatar_url":"https://secure.gravatar.com/avatar/09088668c649256cb1f244ed326f6ec8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"09088668c649256cb1f244ed326f6ec8"},"homepage":"http://github.com/flatiron/resourceful","size":264,"private":false,"svn_url":"https://svn.github.com/flatiron/resourceful"},"label":"flatiron:02fff1b774ad86bdba54ea38a3e69c9dbc87d5aa"},"body":"Saving a valid resource instance works a treat, but if that resource doesn't validate the save() method never calls back, leaving any dependent response hanging.\r\n\r\nI've stepped around this by just pushing the validation errors back as the callback's error argument. This solves the immediate problem of being notified of an error. Maybe it could be improved by passing back a more standard error object but `validation.errors` seemed like it might be more useful so I just went with the simple solution for now.\r\n\r\n\t} else if ( callback ) \r\n\t\tcallback(validation.errors);\r\n\t}\r\n","commits":1,"number":34,"additions":4,"url":"https://api.github.com/repos/flatiron/resourceful/pulls/34","_links":{"review_comments":{"href":"https://api.github.com/repos/flatiron/resourceful/pulls/34/comments"},"html":{"href":"https://github.com/flatiron/resourceful/pull/34"},"self":{"href":"https://api.github.com/repos/flatiron/resourceful/pulls/34"},"comments":{"href":"https://api.github.com/repos/flatiron/resourceful/issues/34/comments"}},"diff_url":"https://github.com/flatiron/resourceful/pull/34.diff","merged_by":null,"comments":0,"head":{"ref":"dc51f5acedbe030843c07975934fb5308926b46a","user":{"id":301677,"login":"richmarr","url":"https://api.github.com/users/richmarr","avatar_url":"https://secure.gravatar.com/avatar/f6a2c52186aab6bbcf642a565a5f5616?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f6a2c52186aab6bbcf642a565a5f5616"},"sha":"dc51f5acedbe030843c07975934fb5308926b46a","repo":{"git_url":"git://github.com/richmarr/resourceful.git","open_issues":2,"watchers":1,"created_at":"2011-11-09T21:26:35Z","fork":true,"updated_at":"2011-12-21T09:44:24Z","id":2744632,"language":"JavaScript","html_url":"https://github.com/richmarr/resourceful","name":"resourceful","description":"A storage agnostic resource-oriented ODM for building prototypical models with validation and sanitization.","master_branch":null,"url":"https://api.github.com/repos/richmarr/resourceful","clone_url":"https://github.com/richmarr/resourceful.git","forks":0,"ssh_url":"git@github.com:richmarr/resourceful.git","pushed_at":"2011-12-21T09:44:24Z","owner":{"id":301677,"login":"richmarr","url":"https://api.github.com/users/richmarr","avatar_url":"https://secure.gravatar.com/avatar/f6a2c52186aab6bbcf642a565a5f5616?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f6a2c52186aab6bbcf642a565a5f5616"},"homepage":"http://github.com/flatiron/resourceful","size":140,"private":false,"svn_url":"https://svn.github.com/richmarr/resourceful"},"label":"richmarr:dc51f5acedbe030843c07975934fb5308926b46a"},"changed_files":1,"merged":false},"number":34,"action":"opened"}