{"action":"opened","issue":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/127","labels_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/127/comments","events_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/127/events","html_url":"https://github.com/cerebris/jsonapi-resources/issues/127","id":63287982,"number":127,"title":"Save error handling relies on ActiveRecord::RecordInvalid","user":{"login":"realityendshere","id":1010440,"avatar_url":"https://avatars.githubusercontent.com/u/1010440?v=3","gravatar_id":"","url":"https://api.github.com/users/realityendshere","html_url":"https://github.com/realityendshere","followers_url":"https://api.github.com/users/realityendshere/followers","following_url":"https://api.github.com/users/realityendshere/following{/other_user}","gists_url":"https://api.github.com/users/realityendshere/gists{/gist_id}","starred_url":"https://api.github.com/users/realityendshere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realityendshere/subscriptions","organizations_url":"https://api.github.com/users/realityendshere/orgs","repos_url":"https://api.github.com/users/realityendshere/repos","events_url":"https://api.github.com/users/realityendshere/events{/privacy}","received_events_url":"https://api.github.com/users/realityendshere/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-20T19:29:02Z","updated_at":"2015-03-20T19:29:02Z","closed_at":null,"body":"I know I am the crazy developer who doesn't use ActiveRecord.\r\n\r\nThe `JSONAPI::Resource._save` method looks for ActiveRecord exceptions as seen in the code block below. Unfortunately, this throws even worse exceptions about not finding ActiveRecord.\r\n\r\n```ruby\r\n    def _save\r\n      @model.save!\r\n      @save_needed = false\r\n    rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotSaved => e\r\n      raise JSONAPI::Exceptions::ValidationErrors.new(e.record.errors.messages)\r\n    end\r\n```"}}